Commit graph

1534 commits

Author SHA1 Message Date
Justin Van Patten d6b7762102
Temporarily disable config secrets warning (#7129)
Temporarily disable the new config secret warning to avoid unactionable warnings from provider `config` modules. We'll re-enable the warning when we've addressed that issue.
2021-05-24 16:06:27 -07:00
Komal ff7237656c
[auto/nodejs] - Reimplement JSON event parsing with Readline (#7032) 2021-05-24 13:03:38 -07:00
Sean Fausett cc8459b2d9
[dotnet/sdk] Use source context with serilog (#7095)
* Use source context with serilog

* Update changelog

* Remove framework reference

* Remove unavailable directives

Requires dotnet 5 or later.

* Use null-forgiving initialization
2021-05-21 18:20:46 -04:00
Justin Van Patten be1ee5566d
Update README.md (#7088) 2021-05-21 10:46:56 -07:00
Ville Penttinen 525ef83dba
[auto/dotnet] Fix deserialization of CancelEvent in .NET 5 (#7051)
* [auto/dotnet] Fix deserialization of CancelEvent in .NET 5

* Update CHANGELOG_PENDING
2021-05-20 09:49:29 -04:00
Sean Fausett ae3da5e7fe
[auto/dotnet] Make StackDeployment.FromJsonString public (#7067)
* Make StackDeployment.FromJsonString public

* Update changelog

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
2021-05-20 09:47:44 -04:00
Mikhail Shilkov 0fa94784ab
Allow outputs in dictionary resource args (#7084)
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2021-05-19 12:10:11 -06:00
Justin Van Patten f973fbcf58
[sdk/nodejs|python] Add GetSchema support to providers (#6892) 2021-05-19 07:11:18 -07:00
Justin Van Patten 070125e685
[sdk/go] Warn when a secret config is read as a non-secret (#7080) 2021-05-18 15:02:43 -07:00
Justin Van Patten 34a40d2b10
[sdk/dotnet] Warn when a secret config is read as a non-secret (#7079) 2021-05-18 15:01:57 -07:00
Justin Van Patten 480173a57f
[sdk/python] Warn when a secret config is read as a non-secret (#7078) 2021-05-18 15:00:30 -07:00
Justin Van Patten a61e79eb0d
[sdk/nodejs] Warn when a secret config is read as a non-secret (#6896) 2021-05-18 09:48:08 -07:00
Pat Gavlin 354946a1e4
Await outstanding async work in Go. (#6983)
The Pulumi Go SDK does not currently await all outstanding asynchronous
work associated with a Pulumi program. Because all relevant asynchronous
work is created via the Pulumi SDK, we can track this asynchronous work
and ensure that it has all completed prior to returning from
`Context.Run`.

This is complicated by the fact that many of the existing APIs that are
able to create `Output`s--`NewOutput`, `ToOutput`, `Any`,  `ToSecret`,
and `All`--do not have a `*Context` parameter, and so have no
straightforward way to associate themselves with a `*Context`. To address
this, these changes add new versions of each of these APIs as methods on
`*Context`.

Despite these new methods, most Pulumi programs should work without
changes: the bulk of `Output`s are created by the SDK itself as part of
resource registration, and for `Any` and `All`, we can pick up the
context from any `Output`s present in the arguments. The only programs
that should require changes are those that create outputs from whole
cloth using `NewOutput`, `ToOutput`, or `ToSecret` and create unawaited
async work rooted at those outputs.

On an implementation level, these changes track asynchronous work using
a `sync.WaitGroup` associated with each `*Context`. This `WaitGroup` is
passed to each output associated with the context. The SDK increments
this `WaitGroup`'s count prior to starting any asynchronous work and
decrements it once the work (including any callbacks triggered by the
work) is complete.

This fixes the Go portion of #3991.
2021-05-14 12:00:21 -07:00
Anton Tayanovskyy 493bac4c18
Make virtualenv paths relative to root when main points elsewhere (#6966)
* Propagate workspace.Project metadata to plugin init

* Get to a working fix

* Propagate Root via plugin context

* Propagate root instead of yaml path

* Revert out unnecessary parameter propagation

* Root is now always absolute at this point; simplify code and docs

* Drop python conditional and propagate unused -root to all lang hosts

* Add tests that fail before and pass after

* Lint

* Add changelog entry
2021-05-14 13:41:55 -04:00
Pat Gavlin bd18384038
Await outstanding async work in .NET. (#6993)
The Pulumi .NET SDK does not currently await all outstanding asynchronous
work associated with a Pulumi program. Because all relevant asynchronous
work is created via the Pulumi SDK, we can track this asynchronous work
and ensure that it has all completed prior to returning from
`Deployment.RunAsync`.

The implementation here is simpler than that in #6983, and re-uses the
existing support for tracking outstanding RPCs. If this proves to
negatively impact performance (which is a very real possibility for
programs that create many `Output` instances), we can simplify this
using a semaphore and a counter (essentially Go's `sync.WaitGroup`).

This fixes the .NET portion of #3991.
2021-05-12 13:23:47 -07:00
Josh Studt be8183180d
[auto/dotnet] - disable language server host logging and appsettings.json check (#7023) 2021-05-12 11:30:28 -07:00
Komal 17fae620af
Skip flaky python test (#7035) 2021-05-12 09:29:13 -07:00
Komal 840c7a5a13
Create stacks serially before setting config concurrently (#7031) 2021-05-12 01:36:03 -07:00
Anton Tayanovskyy 2288f8b7fb
Fix issue with lazy_import affecting pulumi-eks (#7024)
* Fix issue with lazy_import in presense of modules-as-attrs

* Temporary inline _lazy_import into generated code for smooth updates

* Add CHANGELOG entry

* Rename _lazy_import to lazy_import

* Comments on short-circuit behavior

* Comment fix
2021-05-11 22:48:08 -04:00
Komal 3bac1d68b7
Move comment in python SDK (#7028) 2021-05-11 17:23:18 -07:00
Komal 3ef2648f45
Use test-org from env var (#7016) 2021-05-11 08:41:21 -07:00
Evan Boyle 15418b6789
Fix noisy nodejs runtime errors (#6995) 2021-05-10 15:04:03 -07:00
Evan Boyle 815f42d8a5
Set nodejs automation api test org from env (#6996) 2021-05-10 10:39:36 -07:00
Anton Tayanovskyy d55327db50
Fix tests that used to be skipped on missing async lib (#6941) 2021-05-10 13:27:20 -04:00
Justin Van Patten dad7f2c2f0
Config: Avoid emitting integers in objects using exponential notation (#7005)
Config values that are objects are represented in memory as JSON strings. When a config map is being saved to a file, object values are first unmarshaled from JSON to `interface{}` and then the entire config map is marshaled to YAML (or JSON) and saved to disk. When an object value is unmarshaled from JSON, any numbers in the JSON string were being implicitly unmarshaled as `float64`, which resulted in some numbers in the nested objects being emitted in YAML using exponential notation (e.g. a number `12321123131` in an object value was being saved in the YAML as `1.2321123131e+10`). To address this, when unmarshaling the JSON for an object value, first try to unmarshal any numbers as `int64`, falling back to `float64`.
2021-05-10 10:00:23 -07:00
Anton Tayanovskyy 908ac27219
Fix flaky test that fails on unrelated PRs (#6979) 2021-05-10 11:27:55 -04:00
Josh Studt 31fec05a24
[auto/dotnet] - Add PulumiFn implementation for runtime stack type (#6910)
* add runtime stack type pulumi fn implementation

* add exception propagation test and update changelog

* slight refactor to just bring the identical service provider code into the new PulumiFn implementation.

* get tests passing, need service to be registered as transient so that the stack is instantiated each time because pulumi internal rely on instantiation

* check version command was failing because of additional white space it wasn't accounting for
2021-05-10 11:06:25 -04:00
Komal 59992cff97
[automation/python] - Export ProjectBackend class (#6984) 2021-05-06 19:43:31 -07:00
Paul Stack 3e12b4f7e6
Small change to the logic around ambient plugins on the PATH (#6963) 2021-05-04 18:46:04 +01:00
Komal 37baab9749
Use local backend for concurrency test (#6960) 2021-05-04 09:43:11 -07:00
James Nugent c3c617c51f
[plugins] Allow opt out of loading plugins on PATH (#6944)
This commit makes it possible to opt out of loading plugins from PATH by
setting PULUMI_IGNORE_AMBIENT_PLUGINS to any non-empty value. This is
useful when automatic IDE tooling may build remote component plugins
into GOBIN unbeknownst to the user, and a resulting stale version of the
plugin is loaded in place of newer versions - even those , explicitly
installed.
2021-05-04 16:30:59 +01:00
Justin Van Patten 3746028c38
[sdk/python] Don't error when dict input value has a mismatched type (#6949)
Pulumi 3.0 raises an error when a dict value is passed as an input but the type annotation does not accept a dict. Unfortunately, this prevents historical cases where a dict value is allowed but the type annotation doesn't match. We need to fix the type annotations, but in the meantime, we should not raise an error in the SDK for such cases as it breaks existing programs.
2021-05-03 08:47:55 -07:00
Justin Van Patten 81db03ea2a
Fix Python test file names (#6947)
I'd run these tests individually locally, but they need to start with `test_` to be picked up by pytest.
2021-04-30 20:22:25 -07:00
Sean Fausett 92dd696dda Bump YamlDotNet to 11.1.1
https://github.com/aaubry/YamlDotNet/releases/tag/v11.1.1
2021-05-01 08:03:12 +12:00
Justin Van Patten 8574d40dda
[sdk/python] Fix type-related regression on Python 3.6 (#6942)
Pulumi 3.0 uses type annotations for input values to determine whether dict keys should be translated from snake_case to camelCase or not. This additional inspection of types did not work correctly on Python 3.6 due to some missing functionality on that version of Python which we need to provide an implementation for. Specifically, when inspecting `Union` args to determine whether or not a value is intended to be an input class or user-defined dict. To address the issue, this change improves how we get the args for `Union` types when running on Python 3.6 to behave the same way as later versions of Python (for our purposes). Existing tests fail on Python 3.6 before this change, and pass after.
2021-04-30 11:50:42 -07:00
Justin Van Patten 69d50ced27
[sdk/python] Address issues when using resource subclasses (#6890)
We were only looking at the current resource class's type/name metadata for camelCase <=> snake_case property name translations which prevented it from working correctly when using a subclass of a resource. This change addresses this by looking at metadata of the current class and any base classes.

Additionally, to help resolve forward references when getting type hints, we'd pass along the current resource class's globals, which doesn't work correctly when using a subclass of a resource. This change also addresses this, by using the globals of the current class and any base classes.
2021-04-30 10:07:23 -07:00
James Nugent 71fcbfce5f
[kind/bug] [automation/go]: Look in workspace options for version optout (#6938)
When calling l.GetEnvVars() to evaluate whether version checking should
be skipped because of variables passed into the workspace, they have not
yet been set. This commit modifies the logic to look at the environment
variables in the options instead of in the workspace.

Since the original functionality  has not yet been released, I do not
believe it warrants a CHANGELOG entry.
2021-04-30 09:41:31 -07:00
Evan Boyle c3dc2d54ab
Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
Komal bdcb5ecb3c
[automation/go] - Improve default formatting of auto.autoError (#6924)
Co-authored-by: James Nugent <jen20@apple.com>
2021-04-29 13:04:51 -07:00
Sean Fausett 276d3570ed Enable deterministic builds 2021-04-29 14:24:43 +12:00
Vivek Lakshmanan c0b5339cf3
Merge pull request #6901 from pulumi/vl/FixStackSettings
[auto/go] Fix stack settings save/load typo and add tests
2021-04-28 11:35:29 -07:00
Mikhail Shilkov 6100691262
Merge pull request #6905 from gitfool/gh6904
[automation/dotnet] Enable SourceLink with embedded PDB
2021-04-28 13:12:11 +02:00
Mikhail Shilkov d6477b1fc2
Merge pull request #6871 from gitfool/gh6870
[sdk/dotnet] Bump Grpc NuGet packages to 2.37.0
2021-04-28 11:49:26 +02:00
Sean Fausett 28a7e61daf Enable SourceLink with embedded PDB 2021-04-28 21:08:54 +12:00
Vivek Lakshmanan 4b3d2a57c7 [auto/go] Fix stack settings save/load typo and add tests 2021-04-27 22:27:59 -07:00
Komal 1ed3445ed4
[automation/*] - Optionally skip Automation API version check (#6882)
Co-authored-by: James Nugent <jen20@apple.com>
2021-04-27 20:54:27 -07:00
Jonas-Taha El Sesiy 837f75f28b
[auto/go] - Provide GetPermalink for all results (#6875) 2021-04-26 18:18:45 -07:00
Ville Penttinen daa6045381
[automation/*] Add support for getting stack outputs using Workspace (#6859) 2021-04-26 16:32:30 -07:00
Ville Penttinen 3cbfddf870
[automation/dotnet] Use stackName in ImportStack (#6858)
Co-authored-by: Komal <komal@pulumi.com>
2021-04-26 15:12:27 -07:00
Ville Penttinen 52fb4c2d68
[automation/dotnet] Fix EventLogWatcher failing to read events after an exception was thrown (#6821)
* [automation/dotnet] Fix EventLogWatcher failing to read events after exception

* Update CHANGELOG_PENDING.md

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
2021-04-26 16:31:55 -04:00