Commit graph

5446 commits

Author SHA1 Message Date
stack72 3ef0623bfa [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>
```
2020-12-31 13:27:45 +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
Pat Gavlin 9b6a7a4397
Improve resource ref unit tests. (#5960)
- Add component ref coverage to the existing test
- Add coverage for a downlevel SDK communicating with an engine that
  supports resource refs
- Add coverage for a downlevel engine communicating with an SDK that
  supports resource refs

As part of improving coverage, these changes add a knob to explicitly
disable resource refs in the engine without the use of the environment
variable. The environment variable is now only read by the CLI, and has
been restored to its prior polarity (i.e. `PULUMI_ENABLE_RESOURCE_REFERENCES`).
2020-12-16 12:38:20 -08:00
Komal 9b33dd84d5
[codegen/*] - Fix enum names that start with an underscore. (#5950) 2020-12-16 09:22:44 -08:00
Komal 807e7a051e
[codegen/dotnet] - Fix enum naming for k8s (#5956) 2020-12-16 08:58:42 -08:00
Komal a75f63edb5
Fix linting. (#5954) 2020-12-15 17:56:42 -08:00
Pat Gavlin 20743f7be3
Split engine unit tests into individual files. (#5951)
Each file covers a particular feature. These changes are intended to
make the tests easier to navigate.
2020-12-15 14:24:46 -08:00
Komal cae129c7fa
[codegen/*] - Align makeValidIdentifier between languages (#5944) 2020-12-15 12:41:27 -08:00
Komal 791ccc58d4
[codegen/docs] - Remove primitive type links (#5911) 2020-12-14 19:56:45 -08:00
Komal 95c09d88c8
[codegen/docs] - Add enums to docs (#5912) 2020-12-14 14:40:14 -08:00
Mikhail Shilkov 356fe195af
Extensions to support input collection initializers with union types (#5938) 2020-12-14 20:33:53 +01:00
Luke Hoban 8f9054f56c Prepare for v2.15.6 release 2020-12-12 13:04:38 -08:00
Levi Blackstone 54d6703fee
Temporarily disable resource ref support (#5932)
Disable resource ref support until https://github.com/pulumi/pulumi-kubernetes/issues/1405
is fixed. This bug currently affects Python users with recent versions of the pulumi SDK
who are using the pulumi-kubernetes provider.
2020-12-12 12:02:45 -08:00
Evan Boyle 069f9f28cf
Fix bug that could cause Go SDK to drop dependencies (#5930)
* fix bug that could cause Go SDK to drop dependencies

* changelog
2020-12-11 16:27:11 -08:00
Komal fed47e7334
[codegen/docs] - Fix html for property types (#5929) 2020-12-11 12:01:50 -08:00
Levi Blackstone d3c75afce1
[codegen/go] Fix Input/Output methods for Go resources (#5916) 2020-12-11 11:49:08 -07:00
stack72 93e621aef6 Prepare for v2.15.5 release 2020-12-11 11:49:50 +00:00
Justin Van Patten 160220bc4a
[sdk/dotnet] Fix deserializing resources (#5921)
This change implements getResource in the mock monitor. This uncovered some issues deserializing resources, which this change also addresses.
2020-12-10 22:58:08 -08:00
Justin Van Patten afd5ad6a97
[sdk/python] Implement getResource in the mock monitor (#5919) 2020-12-10 15:23:00 -08:00
Levi Blackstone 1674e0c0e4
Fix lint issue 2020-12-10 13:18:27 -07:00