Commit graph

5614 commits

Author SHA1 Message Date
Pulumi Bot 42f355b497
[CLI] Add Version to the output of pulumi stack history (#6063)
fixes: #4328

Allows events to be tracked back to those of the Pulumi SaaS

Co-authored-by: stack72 <public@paulstack.co.uk>
2021-01-07 19:44:15 +00:00
stack72 9d0bac3e08 fixing the install of the DotNet SDK 2021-01-06 20:13:34 +00:00
stack72 fa3490ba2b Prepare for v2.17.0 release 2021-01-06 19:22:20 +00:00
Luke Hoban db14188526
[sdk/go] Support maps in Invoke outputs and Read inputs (#6014)
* [sdk/go] Support maps in Invoke outputs and Read inputs

These are already supported by the implementation, but were prevented by overzealous input validation in Invoke and ReadResource.

Follow-up to #4522 and #4521.

* Add CHANGELOG

* PR feedback
2021-01-06 15:35:13 +11:00
Pat Gavlin e1ac01a9f2
Respect the version option for provider resources. (#6055)
Although raw provider resources accept an input that allows a user to
specifiy a provider version to use, this input is not reflected in
current SDK code generation. Furthermore, we already have a method to
specify the provider version that should be used for a resource: the
"version" resource option. These changes update the code that handles
provider resource registrations to autmoatically populate the version
input from the "version" resource option if the option is present.

Fixes https://github.com/pulumi/pulumi-azure/issues/803.
2021-01-05 15:57:11 -08:00
Mikhail Shilkov 061950dbc2
[codegen/dotnet] Stop generating nested unions (#6047) 2021-01-05 11:13:40 +01:00
Komal 8e8129012e
[automation-api/nodejs] - Support recovery workflow (#6038) 2021-01-04 16:45:57 -08:00
stack72 9d228721b6 Merge branch 'master' of github.com:pulumi/pulumi 2021-01-04 22:39:21 +00:00
stack72 83da48e492 Remove UpdateVersion from UpdateInfo struct as it's already covered by Version 2021-01-04 22:39:10 +00:00
Komal 1ef22c375d
Revert bulk config ops in nodejs auto-api (#6051) 2021-01-04 14:38:55 -08:00
Paul Stack 21de78291f
[CLI] Add a confirmation prompt when deleting a policy pack (#6034)
Fixes: #4292
2021-01-04 22:37:46 +00:00
stack72 7979fe3ff8 Ensure container tests run on ubuntu not macOS 2021-01-04 21:56:20 +00:00
stack72 cf91644cd5 Ensure UpdateInfo doesn't have duplicate field names 2021-01-04 21:34:18 +00:00
Paul Stack c047979b16
Export UpdateID as part of the UpdateInfo event that comes from the SaaS (#6049)
Co-authored-by: Chris Smith <chrsmith@users.noreply.github.com>
2021-01-04 21:26:59 +00:00
Paul Stack 60991a5568
[CLI] Provider better user error when Pulumi credentials file is corrupt (#6044)
Fixes: #2779
2021-01-04 20:36:51 +00:00
stack72 7faf8f2dd5 Ensuring the docker containe tests are only run on ubuntu 2021-01-04 20:36:03 +00:00
Paul Stack fead88d4a6
Ensure that testing containers happens as part of a pulumi publish event (#6030) 2021-01-04 18:28:13 +00:00
stack72 2c6296add2 Merge branch 'gh-2086' 2021-01-04 10:37:25 +00:00
stack72 c5e2d24e92 [CLI] document that pulumi-new can accept template urls
Fixes: #2086

```
pulumi new --help
Create a new Pulumi project and stack from a template.
...

To create a project from a user defined template location in source control, pass the url as follows e.g.
* pulumi new https://gitlab.com/<user>/<repo>
* pulumi new https://bitbucket.org/<user>/<repo>
* pulumi new https://github.com/<user>/<repo>

To create the project from a branch of the user defined source control location, pass the url to the branch, e.g.
* pulumi new https://gitlab.com/<user>/<repo>/tree/<branch>
* pulumi new https://bitbucket.org/<user>/<repo>/tree/<branch>
* pulumi new https://github.com/<user>/<repo>/tree/<branch>
```
2021-01-04 10:36:19 +00:00
Paul Stack a7cabc2519
[CLI] Allow pulumi console to accept a stack name (#6031)
Fixes: #5854

If a stackname is not passed as an argument then it will use the
currently selected stack
2020-12-31 00:45:32 +00:00
Paul Stack ee776b3c33
Update PulumiStackType comments in dotnet and nodejs (#6028) 2020-12-30 23:02:18 +00:00
Luke Hoban 1ef2f10543
Allow serializeFunction to capture secrets (#6013)
Adds an opt-in `allowSecrets` flag to `serializeFunction` to allow it to capture secrets.  If passed, `serializeFunction` will now report back whether it captured any secrets.  This information can be used by callers to wrap the resulting text in a Secret value.

Fixes #2718.
2020-12-31 09:37:25 +11:00
Paul Stack 77ea3fec70
Ensure only latest nuget packages are locally installed (#6027)
Fixes: #3882

This will clean the old packages as well as only "installing" the
latest built package
2020-12-30 21:57:34 +00:00
Mikhail Shilkov 0f9273fc7b
[codegen] Add support for default values in enum properties (#6017) 2020-12-30 12:46:01 +01:00
Komal b8e31446d1
[build/windows] - Fix verbose test logging and increase timeout (#6023) 2020-12-29 15:51:10 -08:00
Komal bc76068ae4
[auto/nodejs] - Parallelize config operations (#6022) 2020-12-29 15:40:22 -08:00
Paul Stack 02b83f3203
Adding Splunk and Equinix Metal providers (#6007) 2020-12-23 23:27:09 +00:00
Levi Blackstone 1d61784c1b
Add make target for debug builds (#6001) 2020-12-23 16:10:05 -07:00
stack72 58c07c52c8 Prepare for v2.16.2 release 2020-12-23 22:02:13 +00:00
Pat Gavlin c6d22a25e5
gRPC bridge: fix unknowns in Update previews (#6006)
These changes are a combination of three commits, each of which
contributes to the testing and/or fixing of a problem with marshaling
unknowns in `plugin.provider.Update` when `preview` is true.

## deploytest: add support for gRPC adapters. 

These changes add support for communicating with providers using the
gRPC adapters to the deploytest pacakage. This makes it easier to test
the gRPC adapters across typical lifecycle patterns.

Supporting these changes are two additions to the `resource/plugin`
package:

1. A type that bridges between the `plugin.Provider` interface and the
  `pulumirpc.ResourceProviderServer`
2. A function to create a `plugin.Provider` given a
  `pulumirpc.ResourceProviderClient`

The deploytest package uses these to wrap an in-process
`plugin.Provider` in a gRPC interface and connect to it without using
the default plugin host, respectively.

## pulumi_test: test provider preview over gRPC.

Add a test that runs the provider preview lifecycle, but using a
provider that communicates over gRPC.

## gRPC bridge: fix unknowns in `Update` previews

Set the `KeepUnknowns` and `RejectUnknowns` bits in the `MarshalOptions`
used when unmarshaling update results to preserve unknowns during a
preview and reject them otherwise.

These changes also set the `RejectUnknowns` bit in the `MarshalOptions`
used by `Create` if `preview` is false, and fix a bug in the array
unmarshaler that could cause out-of-bounds accesses.

Fixes https://github.com/pulumi/pulumi/issues/6004.
2020-12-23 13:25:48 -08:00
Levi Blackstone 782e1bd6e9
[sdk/go] Update RegisterResource[Package/Module] interface (#5868) 2020-12-23 14:10:41 -07:00
Levi Blackstone 7e3d69a53a
Fix CI build 2020-12-22 13:53:16 -07:00
Levi Blackstone dd9b02dcef
Prepare for v2.16.1 release (#5996) 2020-12-22 13:43:08 -07:00
Levi Blackstone 795a11c44e
Fix a panic due to unsafe concurrent map access (#5995)
State tracking for goals was implemented using a raw map,
but this was not safe for concurrent read/write access from
multiple goroutines. Switched to using a sync.Map, which
is threadsafe.
2020-12-22 12:04:49 -07:00
Komal d0676c19a3
Fix virtual env path (#5992) 2020-12-21 17:46:56 -08:00
stack72 0111fb60ba Prepare for v2.16.0 release 2020-12-21 17:52:24 +00:00
Pat Gavlin eeff5257c3
Do not read TGZs into memory. (#5983)
* Do not read TGZs into memory.

This runs a serious risk of exhausting the memory on lower-end machines
(e.g. certain CI VMs), especially given the potential size of some
plugins.

* CHANGELOG

* fixes
2020-12-20 12:54:11 -08:00
Levi Blackstone 8a9b381767
Fix panic related to update with refresh (#5980)
The step generator was incorrectly tracking goal states for
old resources, which could lead to a panic if the resource
was removed in the update. This fix only generates goal
states for resources that exist in the updated program.
2020-12-18 23:03:40 -08:00
Pat Gavlin 268e50d00e
Add Python resource ref unit tests. (#5982)
- Improve the existing coverage to use real resources and mocks
- Add tests for deserialization as well as serialization
- Add tests that serialize custom resources during preview

Contributes to #5943.
2020-12-18 23:02:48 -08:00
Pat Gavlin 23927e4bb1
Use beforeEach in NodeJS tests. (#5975)
Call `runtime._reset` prior to each test to ensure that the runtime is
in a consistent state.

Co-authored-by: Lee-Ming Zen <lee@pulumi.com>
2020-12-18 16:27:27 -08:00
Lee Zen 518ec3a8a5
Assume no terminal if the display width/height is 0 (#5959) 2020-12-18 15:38:15 -08:00
Levi Blackstone 1c87d58b4a
Fix bug with ComponentResource resource refs (#5949)
Now that resources are serialized as refs, ComponentResources
may try to unmarshal local resource refs before they are
initialized during the RegisterResource step.

This change avoids that issue by skipping Output marshaling
for local ComponentResources during the RegisterResource step.
These Outputs will be handled instead during the
RegisterResourceOutputs step.

Co-authored-by: Pat Gavlin <pat@pulumi.com>
2020-12-18 14:45:52 -07:00
Pat Gavlin 860ea4dc84
Add ignoreChanges preprocessing in ImportStep. (#5976)
The step generator applies `ignoreChanges` pre-processing for all
resources by copying old input values to the new goal for any properties
mentioned in the `ignoreChanges` list. However, this pre-processing
depends on the existence of prior inputs, which by definition does not
exist for a resource being imported prior to the issuance of the
`ImportStep`. These changes add this processing to the implementation of
`ImportStep`, using the inputs read from the provider as the prior
inputs.
2020-12-17 14:46:50 -08:00
Pat Gavlin 8e278ca9d3
Improve Python serialization test harness. (#5977)
- Reset the runtime prior to each test
- Use the SDK's `test` decorator instead of `async_test`
- Rename a couple classes to avoid warnings from pytest
2020-12-17 14:45:18 -08:00
Pat Gavlin 05a922b431
Add NodeJS resource ref unit tests. (#5969)
These tests cover the same scenarios that are coverted in the engine's
unit tests, but exercise the Node SDK's marshalling paths.

These changes include a few enhancements to the Node SDK's test APIs
that make it easier to more precisely control its behavior, and extend
the `Mocks` interface to allow the registration of component resources
to work properly.

Contributes to #5943.
2020-12-17 10:49:22 -08:00
Komal b0756cb703
Improve meta tags on documentation (#5968) 2020-12-17 10:44:57 -08:00
jon 30088d34c5
fixes lint checkout target for prs (#5971) 2020-12-16 21:15:06 -08:00
Komal 31cd0934bd
Fix linting. (#5967) 2020-12-16 16:00:59 -08:00
Evan Boyle 268abea53b
bump nodejs test timeout for automation api (#5966) 2020-12-16 12:47:15 -08:00
Lee Briggs de87d3cd88
make import command help a little clearer (#5965) 2020-12-16 12:45:11 -08:00