Commit graph

5977 commits

Author SHA1 Message Date
Ville Penttinen 1f15c10b3d
[automation/dotnet] Fix GetConfigValueAsync failing to deserialize (#6698) 2021-04-06 14:10:30 -07:00
Paul Stack dc0d75feb9
GHA Workflow job to test containers changes (#6708) 2021-04-06 19:00:14 +01:00
Komal 7f226c1cb6
Fix serializing bug if output contains 'items' property (#6705) 2021-04-05 20:36:56 -07:00
Evan Boyle 322760b243
Add program side dynamic provider caching behind env var (#6673) 2021-04-05 14:37:45 -07:00
Levi Blackstone 20b78f49bc
[sdk/go] Use ioutil.ReadFile to avoid forcing 1.16 upgrade (#6703)
#6636 inadvertently changed the minimum Go version
requirement to 1.16 since ReadFile was moved in that
version. Switch back to ioutil.ReadFile to avoid forcing
an upgrade at this time.
2021-04-05 15:02:13 -06:00
Komal 5254e3f01d
[python/sdk] - Fix serialization bug if output contains 'items' property (#6701) 2021-04-05 12:39:56 -07:00
Justin Van Patten 394f79f27f
[sdk/nodejs] Fix construct to wait for RPC operations to complete (#6452)
This change fixes the provider implementation of `Construct` for multi-lang components written in Node.js to wait for any in-flight RPCs to finish before returning the results, s.t. all registered child resources are created.

In additional, invocations of `construct` are now serialized so that each call runs one after another, avoiding concurrent runs, since `construct` modifies global state. We'll follow-up with a more general concurrency fix to allow nested `construct` calls within the same provider.
2021-04-05 11:11:27 -07:00
Justin Van Patten dcf4359c57
[codegen/python] Support <Resource>Args classes (#6525)
Add support for creating instances of resources in Python using a
`<Resource>Args` class. This capability aligns with how args are passed
to resources in all the other language SDKs and the separate object bag
allows the properties to be manipulated/validated/passed-around before
creating the resource.
2021-04-02 10:09:17 -07:00
Anton Tayanovskyy 0b626126c0
Avoid scanning types from some assemblies (#6688) 2021-04-02 12:11:59 -04:00
Ville Penttinen c8fd984488
[automation/dotnet] Allow null environment variables (#6687)
* [automation/dotnet] Allow null environment variables

* Update CHANGELOG_PENDING.md

* Update sdk/dotnet/Pulumi.Automation.Tests/LocalPulumiCmdTests.cs
2021-04-02 10:08:43 -04:00
stack72 a7353e66c9 Merge branch 'master' of github.com:pulumi/pulumi 2021-04-02 12:12:10 +01:00
Anton Tayanovskyy 2c449fd70f
Simplify env var propagation (#6682)
* Simplify env var propagation

* Fix typo
2021-04-01 18:06:03 -04:00
stack72 7f6ec8a7cf Cleanup after v2.24.1 release 2021-04-01 22:11:21 +01:00
Levi Blackstone 2dad8a6649
Revert "Swap out YAML parser library (#6642)" (#6681)
This reverts commit ff2cf70
2021-04-01 14:44:29 -06:00
Anton Tayanovskyy fc8262bad0
Avoid overriding dotnet proj settings accidentally (#6670)
* Add failing test

* Guard against overrding project settings accidentally

* Throw exception in case of conflct

* Update sdk/dotnet/Pulumi.Automation/DictionaryContentsComparer.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectRuntime.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectTemplateConfigValue.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectTemplate.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectRuntimeOptions.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectBackend.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectSettings.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Reduce nesting

* Make the new exception public

* Introduce a CHANGELOG entry since we add to pub API

* Stricter check before throwing

* Address PR feedback, round 1

* Use Reference.Equals check

* Move DictionaryContentsComparer out of top-level

Co-authored-by: Komal Ali <komal@pulumi.com>
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2021-04-01 15:27:24 -04:00
Pat Gavlin 55ecf7a81e
Run SDK lint jobs (#6674)
Just what it says on the tin. Fixes #6628.
2021-04-01 11:23:47 -07:00
Vivek Lakshmanan 2b75dd6027
Merge pull request #6630 from mweathers/restSerialization
Be resilient to 3rd party libraries placing a __rest function on the global object.
2021-04-01 10:33:35 -07:00
Komal 7f8985ab0f
Revert "Allow environment variables to have a null value (#6520)" (#6677)
This reverts commit 17d1ce509e.
2021-03-31 21:15:38 -07:00
Dan Friedman 17d1ce509e
Allow environment variables to have a null value (#6520) 2021-03-31 18:32:18 -07:00
Justin Van Patten a9f0aead13
[codegen/go] Fix Go resource registrations (#6641)
We've been emitting calls to `New<Resource>` for resource registrations
in Go, passing `nil` for args. However, some of those `New<Resource>`
functions actually check for `nil` args and return an error if the
resource has required arguments.

At first, I was looking for a way to check inside `New<Resource>` if
the `URN` option was specified and in that case not error on
`nil` args (like we do in other languages), but we don't provide a way
to access the resource option values outside the Go SDK), so I don't
think there is a way to do it this way for Go.

So instead, this change updates the registration code to call
`ctx.RegisterResource` directly instead of `New<Resource>`, where we can
pass a `nil` args.
2021-03-31 16:50:30 -06:00
Vivek Lakshmanan 656ed796a1
Merge pull request #6528 from pulumi/vl/Nested
[codegen/go] Support nested collection types
2021-03-31 14:37:56 -07:00
stack72 80a43e9bec [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v2.24.0 2021-03-31 21:27:02 +01:00
stack72 0a8e2e8b02 Prepare for v2.24.0 release 2021-03-31 21:11:45 +01:00
Komal 55a0c1fc8e
[automation/go,nodejs,python] - Don't roundtrip project settings if file already exists. (#6669) 2021-03-31 11:00:11 -07:00
Komal 7671e85440
[automation/go,nodejs,python] - Respect existing project settings (#6655) 2021-03-31 07:51:11 -07:00
Anton Tayanovskyy ce9ab05935
Use CliWrap for subprocess management (#6654)
* Use CliWrap for subprocess management

* Reintroduce .Stop(), fix compilation

* Sanitize command name.
2021-03-31 10:41:02 -04:00
Paul Stack 4efec0f791
[docker] allow docker container builds to pass when security advistory (#6662)
Right now, we test the container at the end of the build rather than
before publishing so while we decouple that work, we should not fail
the build step if a security advisory was found - it's too late, the
containers are released so we should instead catch the advisory and
that will allow our release pipeline to continue
2021-03-31 15:22:58 +01:00
Paul Stack bf1a8d3387
Ensure that v is passed to the ldflags as part of windows binary creation (#6659) 2021-03-31 12:46:49 +01:00
Vivek Lakshmanan 78c48d5d31 Fix comment/example handling 2021-03-30 22:24:45 -07:00
Vivek Lakshmanan fec7209d6b PR comments and some additional cleanup 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 3151d23f09 Fix to create inputs for nested collections types 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 81f35f530f Fix tests for builtins 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 05b196dc59 Avoid processing collections of primitives 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 8b5e196209 Cleanup 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan a83910f46a Update builtins to support ArrayArrayMap 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 700a576b70 Support nested collection types 2021-03-30 22:24:11 -07:00
Evan Boyle d098f9181b
fix nodejs resource functions to properly propagate errors (#6644) 2021-03-30 20:16:25 -07:00
Evan Boyle 1140e9f2bf
Add provider side caching for dynamic provider deserialization (#6657) 2021-03-30 19:15:08 -07:00
Komal 7d10e8c5be
Fix mypy errors (#6656) 2021-03-30 19:11:13 -07:00
Ville Penttinen 529fe8fc51
[automation/dotnet] Expose structured logging (#6572)
* [automation/dotnet] Start implementing structured event log support

* Add Events and their models

* Introduce new IStringToEnumConverter

This is intended to be used for converting a non-standard enum names
into corresponding enum values. The converter is utilized via
StringToEnumJsonConverter with OperationType and DiffKind.

* Add event-log support to up, refresh, destroy

* Update event-log tests

* Use lock instead of semaphore in EventLogWatcher

* Add ChangeSummary to PreviewResult

* Minor update

* Add doc comments to Events

* Use PropertyDiffModel in StepEventMetadataModel

* Set Events to public

* Set properties to public

* Fix PreludeEvent.Config doc comment

* Remove TODOs

* Update Pulumi.Automation.xml

* Set PULUMI_DEBUG_COMMANDs in Workspace.

* Split Events and their models to separate files

* Rename abbreviated Events

* Remove CancelEventModel

* Rename HandlesEvents test project and stack

* Update CHANGELOG_PENDING.md

* Rename abbreviated EngineEvent properties

* Implement custom exceptions

* Move event-log setup to LocalPulumiCmd

* Update comments

* Implement polling EventLogWatcher

This replaces the previous watcher which utilized FileSystemWatcher.

* Guard against onEvent throwing

* Dispose CancellationTokenSource

* WIP: try more direct error handling in EventLogWatcher

* A bit more tests

* Reformat

* Update sdk/dotnet/Pulumi.Automation.Tests/EventLogWatcherTests.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation.Tests/EventLogWatcherTests.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Make race condition workaround more explicit

* Untabify

* Remove unnecessary using and change String to string

* Update doc comments on Events

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
Co-authored-by: Anton Tayanovskyy <anton.tayanovskyy@gmail.com>
2021-03-30 14:57:38 -04:00
Komal 35321159fc
[sdk/python] - Await all async tasks (#6606) 2021-03-30 10:56:17 -07:00
Levi Blackstone ff2cf701a7
Swap out YAML parser library (#6642)
Related to #423
2021-03-29 14:49:00 -06:00
Levi Blackstone 0a2452f1f5
[test] Randomize stack names for some .NET tests (#6637) 2021-03-29 13:08:41 -06:00
Pat Gavlin 7c5ec6815e
Make data sources catchable in Python (#6504)
The current logic lets unhandled errors in the RPC invocation
unahandled in the async loop, which crashes the process due to
the way we await completion of RPCs before exiting the process
in Python. Instead of doing that, we can just marshal them back
to the synchronous awaiter as part of the calling convention,
and have that awaiter (which is called by the invoke methods)
re-raise the exception. This should fix pulumi/pulumi#3611.
2021-03-29 12:07:43 -07:00
Komal e5223492c7
[automation/python] - Fix passing of extra environment variables (#6639) 2021-03-29 11:48:17 -07:00
Levi Blackstone 8cdac3e4ca
[cli] Strip Byte-order Mark (BOM) from YAML configs during load (#6636)
Some YAML parsers don't correctly handle Byte-order marks,
so automatically strip it off during load.

Related to #423

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-03-29 11:56:19 -06:00
Anton Tayanovskyy 65396a25fc
Make .old and .new nullable on StateEventMetadata (#6625) 2021-03-29 10:43:57 -04:00
Matt Weathers aed070c8e6 Be resilient to 3rd party libraries placing a __rest function on the global object. 2021-03-26 21:23:48 -05:00
Justin Van Patten 872d9cb849
[sdk/python] Fix mypy errors (#6627) 2021-03-26 15:41:08 -07:00
Levi Blackstone 80270174f4
[tests] Add test to validate generated config file (#6624) 2021-03-26 13:10:41 -06:00