Commit graph

3819 commits

Author SHA1 Message Date
CyrusNajmabadi
2afe5b88b8
Disable interactive-terminal spinner when on a CI machine. (#3070) 2019-08-13 12:50:09 -07:00
Alex Clemmer
6b4832b416 Emit stderr of npm install
If we don't process and report the stderr of `npm install`, the output
is "orphaned" during error condition, and only something like "exit code
1" is reported.
2019-08-13 12:48:16 -07:00
Pat Gavlin
57b6e84645
Prepare for the v1.0.0-beta.1 release. (#3079)
- Update scripts/get-version and friends to understand the new -alpha
  and -beta tags
- Update the CHANGELOG
2019-08-13 11:41:32 -07:00
CyrusNajmabadi
1a698cbc9e
Fix crashes around secrets with 'undefined' value. (#3069) 2019-08-12 16:00:20 -07:00
Alex Clemmer
ef8cc236c4 Implement --policy-pack flag on up and preview
Fixes pulumi/pulumi-policy#43.
2019-08-12 12:45:48 -07:00
Alex Clemmer
0dccc4b447 Normalize policy pack installation path
Fixes pulumi/pulumi-policy#59.
2019-08-12 12:45:48 -07:00
Alex Clemmer
93cd089428 Print help message when too few arguments
Fixes pulumi/pulumi-policy#61.
2019-08-12 12:45:48 -07:00
CyrusNajmabadi
26639ca357
Do not include 'test' package in our python library. (#3067) 2019-08-12 11:33:35 -07:00
CyrusNajmabadi
de254aa389
Do not include 'test' package in our python library. (#3067) 2019-08-12 11:32:33 -07:00
Pat Gavlin
7fef102bc3
Check for valid PB types in serialize_property (#3060)
Just what it says on the tin. This allows us to return an incrementally
better error.

Fixes #2939.
2019-08-09 16:48:28 -07:00
Praneet Loke
a190e54988
Add support for detecting Jenkins CI env vars. (#3039) 2019-08-09 12:53:51 -07:00
Pat Gavlin
91af1a93c4
Fix a reentrancy issue in _sync_await. (#3056)
_sync_await was not reentrant with respect to _run_once: the latter
captures the length of the ready list before it iterates it, and the
former drains the ready list by reentering _run_once. Fix this by
tracking the length of the list before pumping the event loop and then
pushing cancelled handles on to the list as necessary after pumping the
loop.

These changes also fix an issue with `export`ing awaitables.

Fixes #3038.
2019-08-08 19:51:11 -07:00
CyrusNajmabadi
24e2c6f791
Workaround intermittent issue on some machines where Object.values can't be found. (#3054) 2019-08-08 12:11:46 -07:00
Pat Gavlin
3c03ee3bdd
Fix invoke error reporting. (#3048)
- Report all failures
- Use appropriate member functions to access failure details

Fixes https://github.com/pulumi/pulumi-terraform/issues/396
2019-08-08 09:14:36 -07:00
Alex Clemmer
154c1caa43 Fix small bug in untar code 2019-08-07 17:06:57 -07:00
Alex Clemmer
12668756d5 Use S3 URL for policy pack download
Companion to the breaking change at pulumi/pulumi-service#3842.
2019-08-07 13:12:49 -07:00
Pat Gavlin
6983e2639b
Fix conversion of empty array properties. (#3047)
Empty `[]interface{}` values were being converted to array property
values with a `nil` element, and empty array property values were being
coverted to `nil` `[]interface{}` values. These changes fix the
converters to return empty but non-nil values in both cases.

This is part of the fix for
https://github.com/pulumi/pulumi-kubernetes/issues/693.
2019-08-07 11:42:40 -07:00
CyrusNajmabadi
a13a04b193
Move resource-options check down to core layer. (#3043) 2019-08-06 17:39:34 -07:00
Alex Clemmer
1da23d6a1e Fix typo in PP script 2019-08-06 17:35:52 -07:00
Christian Nunciato
6800c41da4
Merge pull request #3036 from pulumi/cnunciato/actions-11
Send GitHub Actions CLI output to a file
2019-08-06 17:09:33 -07:00
Christian Nunciato
3c83fe6db0 Use mktemp for the output file
Signed-off-by: Christian Nunciato <c@nunciato.org>
2019-08-06 16:33:51 -07:00
Pat Gavlin
62189e6053
Harden asset and archive deserialization. (#3042)
- Ensure that type assertions are guarded, and that incorrectly-typed
  properties return errors rather than panicking
- Expand the asset/archive tests in the Node SDK to ensure that eventual
  archives and assets serialize and deserialize correctly

Fixes #2836.
Fixes #3016.
2019-08-06 16:32:05 -07:00
CyrusNajmabadi
60206e716b
Fix spellin (#3041) 2019-08-06 16:16:33 -07:00
Christian Nunciato
e0b5bae352 Address feedback, update CHANGELOG
Signed-off-by: Christian Nunciato <c@nunciato.org>
2019-08-06 13:58:28 -07:00
Christian Nunciato
9d45b92d7a Send GitHub Actions CLI output to a file
During a GitHub Actions run, because we currently capture CLI output in a variable and exit immediately on failure, we prevent the details of the failure from being rendered in the Actions log. This change has us `tee` stdout instead (as the intent is to use it to post a PR comment later), allowing errors to be rendered properly in the log.

Signed-off-by: Christian Nunciato <c@nunciato.org>
2019-08-06 11:57:56 -07:00
CyrusNajmabadi
c846015643
Add tests (#3031) 2019-08-05 21:53:39 -07:00
Justin Van Patten
eedc760689
Fix typo in CHANGELOG.md (#3029) 2019-08-05 17:16:22 -07:00
Alex Clemmer
99a92c79d8 Update go.mod 2019-08-05 16:12:12 -07:00
Alex Clemmer
7070304f81 Use npm pack for policy publish
Fixes #35.
2019-08-05 16:12:12 -07:00
Alex Clemmer
6360cba588 Improve "project not found" error messages
Fixes pulumi/pulumi-policy#36.
Fixes pulumi/pulumi-policy#37.
2019-08-05 14:14:20 -07:00
Erin Krengel
2a968a2086
Move required PP out of start update (#3023) 2019-08-05 13:57:43 -07:00
Pat Gavlin
2ab814fd09
Do not resolve missing outputs to inputs in preview. (#3014)
This can cause `apply`s to run on values that may change during an
update, which can lead to unexpected behavior.

Fixes #2433.
2019-08-05 12:44:04 -07:00
Luke Hoban
8da252270f
Fix tsconfig.json (#3028)
Missing files here lead to docs not being included.  In particular, docs for `interface CodePathOptions` were missing.
2019-08-05 11:55:55 -07:00
Pat Gavlin
8fd05fcd9f Prepare the CHANGELOG for v0.17.28. 2019-08-05 11:46:51 -07:00
Pat Gavlin
06034fab40
Only await input properties once. (#3024)
These changes fix a bug in the Python runtime that would cause any
awaitable input properties passed to a resource that are missing
from the resource's output properties to be awaited twice. The fix is
straightforward: rather than roundtripping an input property through
serialize/deserialize, just deserialized the already-serialized input
property.

Fixes #2940.
2019-08-03 10:29:19 -07:00
Pat Gavlin
00bc1287af
Support synchronous invokes in Python 3.6. (#3025)
Python 3.6 does not expose _{enter,leave}_task. Detect this situation
and implement the equivalent operation as necessary.
2019-08-02 16:52:56 -07:00
Luke Hoban
6ed4bac5af
Support additional cloud secrets providers (#2994)
Adds support for additional cloud secrets providers (AWS KMS, Azure KeyVault, Google Cloud KMS, and HashiCorp Vault) as the encryption backend for Pulumi secrets. This augments the previous choice between using the app.pulumi.com-managed secrets encryption or a fully-client-side local passphrase encryption.

This is implemented using the Go Cloud Development Kit support for pluggable secrets providers.

Like our cloud storage backend support which also uses Go Cloud Development Kit, this PR also bleeds through to users the URI scheme's that the Go CDK defines for specifying each of secrets providers - like `awskms://alias/LukeTesting?region=us-west-2` or `azurekeyvault://mykeyvaultname.vault.azure.net/keys/mykeyname`.

Also like our cloud storage backend support, this PR doesn't solve for how to configure the cloud provider client used to resolve the URIs above - the standard ambient credentials are used in both cases. Eventually, we will likely need to provide ways for both of these features to be configured independently of each other and of the providers used for resource provisioning.
2019-08-02 16:12:16 -07:00
Pat Gavlin
63eb7abb59
Make pulumi.runtime.invoke synchronous. (#3019)
These changes make the `pulumi.runtime.invoke` function invokable in a
synchronous manner. Because this function still needs to perform
asynchronous work under the covers--namely awaiting a provider URN and
ID if a provider instance is present in the `InvokeOptions`--this
requires some creativity. This creativity comes in the form of a helper
function, `_sync_await`, that performs a logical yield from the
currently running event, manually runs the event loop until the given
future completes, performs a logical resume back to the
currently executing event, and returns the result of the future.

The code in `_sync_await` is a bit scary, as it relies upon knowledge of
(and functions in) the internals of the `asyncio` package. The necessary
work performed in this function was derived from the implementations of
`task_step` (which pointed out the need to call `_{enter,leave}_task`)
and `BaseEventLoop.run_forever` (which illustrated how the event loop is
pumped). In addition to potential breaking changes to these internals,
the code may not work if a user has provided an alternative implementation
for `EventLoop`. That said, the code is a close enough copy of
`BaseEventLoop.run_forever` that it should be a reasonable solution.
2019-08-02 14:19:56 -07:00
Charlie Hills
654f5e2d35 Fixes python get_secret always returning None (#3022)
get_secret was looking up secrets by the fully resolved key, but should use the simple key.
2019-08-02 09:59:51 -07:00
CyrusNajmabadi
d1376db975
Support arbitrary stack export values in python. (#3015) 2019-08-01 20:00:07 -07:00
Luke Hoban
aac25eabc4
Add requireOutput to StackReference (#3007)
Provides an additional helper function to read outputs from a stack reference in case it is known that the stack output must be present. This is similar to the design for config.get and config.require.

Fixes #2343.
2019-08-01 11:27:32 -07:00
Chris Smith
17ee050abe
Refactor the way secrets managers are provided (#3001) 2019-08-01 10:33:52 -07:00
CyrusNajmabadi
c30b8a509e
Always print out the last diagnostics we got. Unless we had an error and we're in the tree-view. (#3011) 2019-08-01 10:21:47 -07:00
CyrusNajmabadi
0ee75d2201
Remove /cloud from readme. (#3010) 2019-07-31 20:16:04 -07:00
Mikhail Shilkov
653501758d Retry renaming a temporary folder during plugin installation (#3008)
A workaround for #2695

During the plugin installation, we create a temporary folder, unzip the binary, and then rename the folder to a permanent name. The rename fails 90% of the time with access denied. An immediate retry of renaming seems to always succeed.
2019-07-31 17:44:26 -07:00
Mikhail Shilkov
d7a3987f47 Prevent poorly formatted strings in fatal error messages (#2995)
Fixes #1511
2019-07-31 17:42:59 -07:00
Luke Hoban
3d4c01abeb
Add Output.concat to Python (#3006)
Fixes #2366
2019-07-31 11:35:05 -07:00
Pat Gavlin
6804d640fc Only parse flags if they are not already parsed.
Just what it says on the tin.
2019-07-31 11:29:00 -07:00
Pat Gavlin
1af7449f1a
Remove references to pulumi/glog. (#3009)
This package's flags conflict with those in google/glog. Replace all
references to this package with references to
pulumi/pulumi/pkg/util/logging, and change that package to explicitly
call `flag.CommandLine.Parse` with an empty slice.

This should make it much easier to consume these packages in downstream
repos that have direct or indirect dependencies on google/glog.
2019-07-31 13:23:33 -05:00
Pat Gavlin
67ec74bdc5
Pass ignoreChanges to providers. (#3005)
These changes add support for passing `ignoreChanges` paths to resource
providers. This is intended to accommodate providers that perform diffs
between resource inputs and resource state (e.g. all Terraform-based
providers, the k8s provider when using API server dry-runs). These paths
are specified using the same syntax as the paths used in detailed diffs.

In addition to passing these paths to providers, the existing support
for `ignoreChanges` in inputs has been extended to accept paths rather
than top-level keys. It is an error to specify a path that is missing
one or more component in the old or new inputs.

Fixes #2936, #2663.
2019-07-31 11:39:07 -05:00