Commit graph

4734 commits

Author SHA1 Message Date
Evan Boyle
8dd329f57f
Go basic program gen (#4667) 2020-05-21 10:23:33 -07:00
Zack Chase
0f17d7a21e
Merge pull request #4647 from pulumi/zchase/readme-youtube-video
Add YouTube video to README.md
2020-05-20 09:55:09 -07:00
Justin Van Patten
af3d4b890d
Allow pulumi.export calls from unit tests (#4670)
The previous attempt to allow this didn't actually allow it, so this is
take two. As part of the previous attempt, I thought after tweaking the
test I had observed the test failing, and then succeeding after making
the product changes, but I must have been mistaken.

It turns out that our existing mocks tests weren't running at all
because of a missing `__init__.py` file. Once the missing `__init__.py`
is added, the tests run, but other tests ("test mode" tests) fail
because the code that creates the mocks and resources will run during
test discovery, and setting the mocks modifies global state.

To address the test issue, I've moved the mocks tests into their own
`test_with_mocks` package that can be run separately from other tests.

And addressed the original issue, by creating a root Stack resource if
one isn't already present when the mocks are set.
2020-05-20 09:54:40 -07:00
Lee Briggs
bfe99021a1
Merge pull request #4643 from pulumi/feature/go-cloud-azurekeyvault-regions
Use patched azure gocloud library
2020-05-19 19:15:35 -07:00
Lee Briggs
e2554e446f
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 16:51:26 -07:00
Evan Boyle
20452b9cb5
fix dotnet error (#4668) 2020-05-19 12:06:24 -07:00
Lee Briggs
afb9456aa8
Remove replace for gocloud.dev 2020-05-19 08:09:58 -07:00
Lee Briggs
362fc8d7f2
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 08:07:09 -07:00
Mikhail Shilkov
adfa8116fb
Introduce k8s compatibility mode to C# codegen (#4544)
Introduce k8s compatibility mode to C# codegen
2020-05-19 11:41:06 +02:00
Dan Hernandez
a46731f36c
Include case when attempting to escape the . in a name. (#4513) 2020-05-19 10:11:58 +01:00
Mikhail Shilkov
f66100ce28
Initial support for C# program gen (#4611)
Initial support for C# program gen
2020-05-19 10:18:38 +02:00
Pat Gavlin
088751a4a8
[codegen/hcl2] Refactor package schema loading. (#4661)
- Move the implementation of loadPackageSchema into a method on
  PackageCache
- Protect the cache with synchronization primitives to enable
  concurrency in downstream consumers
- Use jsoniter to deserialize schemas
2020-05-18 17:35:11 -07:00
Mikhail Shilkov
5b0c4e162d
Fix NRE in C# mocks and include the stack to result again (#4656)
Fix NRE in C# mocks and include the stack to result again
2020-05-18 17:18:12 +02:00
Lee Briggs
72766fd4e6
Use latest upstream of gocloud.dev 2020-05-18 07:43:41 -07:00
Lee Briggs
728d889bf8
Use patched azure gocloud library
Fixes #4642
2020-05-18 07:43:35 -07:00
Lee Briggs
e045c2ac71
# This is a combination of 2 commits.
# This is the 1st commit message:

Use patched azure gocloud library

Fixes #4642

# The commit message #2 will be skipped:

# sync with pulumi-master branch
2020-05-18 07:43:20 -07:00
Praneet Loke
30b12cff49
[codegen/docs] Various Go-related fixes (#4646)
* Remove code that was hiding Go as a language option for k8s overlay resources. Mark input args type for Functions as optional in Go.

* Show a special note in the Go function's snippet when the function name does not match other languages.

* Make sure the draft PR stays assigned to the original author. Add some more comments.

* Remove logic to use the Go ModuleToPackage map to then lookup the relevant C# namespace. Make getLanguageModuleName a method of modContext since passing in a package is not needed anymore.
2020-05-15 17:33:56 -07:00
Mikhail Shilkov
5b410ec440
Resolve referenced packages for every TF program (#4636) 2020-05-15 19:18:07 +02:00
Zack Chase
26385a66ba Make youtube preview smaller 2020-05-15 09:52:23 -07:00
Sean Holung
f5ed6190ba
Link Python and Go constructors (#4593) 2020-05-15 09:51:24 -07:00
Zack Chase
9bb5ae8e59 Move youtube video lower on page 2020-05-15 09:50:10 -07:00
Zack Chase
054652e3fb Remove iframe use linking strategy 2020-05-15 09:38:01 -07:00
Zack Chase
81c6049d06 Add youtube video to readme 2020-05-15 09:14:54 -07:00
Pat Gavlin
e677c7d6dc
[sdk/go] Add support for untagged outputs. (#4640)
With these changes, a resource struct may tag a field with the empty
string. If such a field is present, any resource outputs that were not
unmarshalled into other fields will be unmarshalled into this field,
which must be a `MapOutput`.

Fixes #4629.
2020-05-14 14:43:20 -06:00
Pat Gavlin
e9dd0e5e69
[codegen/schema] Path unescape type tokens in refs (#4641)
Some type tokens contain characters that are not valid in a single
URL path element (`/` in particular). These type tokens may be
path-escaped, and should be unescaped before they are interpreted.
2020-05-14 13:35:57 -07:00
Lee Briggs
cae7743863
Add integration tests for gcp and azure (#4525) 2020-05-14 18:19:10 +01:00
Chris Smith
729f7a64c7
Only mount a directory with the test binary into the container (#4639) 2020-05-14 10:05:59 -07:00
Evan Boyle
0d257bb32d
go gen_program shell + test + sample (#4630) 2020-05-14 08:43:12 -07:00
Lee Briggs
d01a84eee8
Prepare for v2.2.1 release 2020-05-13 20:52:44 -07:00
Lee Briggs
f2a5883cb3
Merge pull request #4633 from pulumi/pgavlin/makeBrew
Add a brew target.
2020-05-13 20:48:24 -07:00
Lee Briggs
8c314ec39a
Add brew make targets to sdk makefiles 2020-05-13 20:42:01 -07:00
Pat Gavlin
f50e2d8c1b Add a brew target.
This is necessary for the Homebrew build.
2020-05-13 20:27:15 -07:00
Pat Gavlin
8f0a002a26
Generate deprecation comments in Go. (#4631)
This is consistent with the convention for marking members as
deprecated: https://github.com/golang/go/wiki/Deprecated.
2020-05-13 17:12:59 -07:00
Lee Briggs
a5c08a74fe
Prepare for v2.2.0 release 2020-05-13 13:49:00 -07:00
Paul Stack
490da8e4d7
Run npm ci if lock or shrinkwrap file found (#4622) 2020-05-13 19:32:36 +01:00
Pat Gavlin
99852bc18e
[codegen/nodejs] SDK generator fixes. (#4618)
- Add support for constant values in unions (e.g. `"foo" | "bar"`)
- Generate `Input<T | U>` instead of `Input<T> | Input<U>`
- Emit deprecation messages for resources
- Handle nil state inputs
- Allow packages to provide a README
- Remove sync invoke support

These changes are part of
https://github.com/pulumi/pulumi-terraform-bridge/issues/179, and
restore functional parity with the current `tfgen` generator.
2020-05-13 10:55:37 -07:00
Praneet Loke
54f5a0ac36
[codegen/docs] Use the C# namespaces override map for links. (#4616) 2020-05-13 09:32:40 -07:00
Paul Stack
0318ef1402
Pass yes as a parameter to the actions entrypoint (#4458) 2020-05-13 16:30:53 +01:00
Pat Gavlin
647b6627a2
[codegen/hcl2] Fix descent in RewriteConversions. (#4614)
Descend into anonymous function expressions, the operands to conditional
expressions, and the value in for expressions.
2020-05-13 08:25:26 -07:00
Chris Smith
71910a1c52
Add PULUMI_SKIP_CONFIRMATIONS env var (#4477) 2020-05-13 14:01:02 +01:00
Lee Briggs
8a38ce2cb2
Install golang in pulumi image (#4612) 2020-05-13 13:24:42 +01:00
Paul Stack
ebde7ae0b7
Add missing CHANGELOG due to v2.1.1 patch release (#4620) 2020-05-13 11:37:32 +01:00
Praneet Loke
fcac4af8ae
[codegen/docs] Generate a table with links to the language-specific module pages (#4597)
* Generate language package details in the index pages.

* Add a new DocLanguageHelper interface method to get to a module per-language. 

* Add a new workflow file for automatically creating draft docs PRs for previewing resource docs for AWS and Kubernetes as a result of changes in the resource docs generator.
2020-05-12 15:37:37 -07:00
Chris Smith
bc02ca6750
Skip cleanup step (#4590) 2020-05-11 14:15:53 -07:00
Pat Gavlin
33258326e0
[codegen/hcl2] Add a conversion insertion pass. (#4594)
Add a rewriter that reifies implicit conversions into a call to the
`__convert` intrinsic. Code generators can recognize this intrinsic and
use it to generate appropriate conversion code.

Part of this work involves redesigning the type annotations system.
Annotations are now only applicable to opaque and object types. Instead
of inspecting annotations directly, code generators should use
`hcl2.GetSchemaForType` to extract the `schema.Type` for a `model.Type`.
2020-05-11 11:17:36 -07:00
Paul Stack
48f906e026
Allow pulumi stack export to decrypt secrets (#4046) 2020-05-11 19:16:30 +01:00
Pat Gavlin
255620ea1e
[codegen/nodejs] Await invokes in async contexts. (#4598)
If we are generating code into an async context (e.g. an async main),
await calls to invoke rather than leaving them as promises. This results
in more idiomatic code withing such contexts.
2020-05-11 10:21:56 -07:00
Luiz Ferraz
2bfef6f4d7
Allows conditional dependencies and Resources from apply (#4446) 2020-05-08 17:57:08 -07:00
Paul Stack
d9e01da0aa
Merge pull request #4586 from pulumi/stack72/gh-4585
Ensure Go build is an optional step in integration testing framework
2020-05-09 01:29:28 +01:00
Praneet Loke
aa313aecf8
[codegen/docs] Add a new template for examples section (#4591)
* Add a new template for examples section. Extract the examples section into a structured format for custom template processing.

* Update the description IFF we were able to extract examples sections from it.

* Update doc comments and add missing file header for the newly added file.

* Make the example description readable. Add a check for empty example sections.

* Add a chooser right below the Example Usage header. Remove javascript as a language.

* Allow an empty new-line between short-codes boundaries.
2020-05-08 16:25:28 -07:00