Commit graph

3805 commits

Author SHA1 Message Date
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
CyrusNajmabadi 7bdd590586
Add deprecation warnings. (#3004) 2019-07-30 15:51:44 -07:00
Luke Hoban 852a8f9dc9
Highlight the Get Started guide in the README (#3003)
Tactical improvement to make the getting started experience easier to find from the project homepage.
2019-07-30 11:32:36 -07:00
CyrusNajmabadi 96d7bedce4
Update CL (#2998) 2019-07-29 12:51:11 -07:00
CyrusNajmabadi 93f0bd708d
Add helper function for merging ResourceOptions (#2988) 2019-07-29 12:01:10 -07:00
James Nugent d1d2affa73
Merge pull request #2997 from pulumi/jen20/glog-branch
Depend on pulumi-master instead of master for pulumi/glog
2019-07-29 12:54:03 -05:00
James Nugent 12b5318730 Update CHANGELOG.md 2019-07-29 12:27:26 -05:00
James Nugent 77741a1738 Depend on pulumi-master instead of master for pulumi/glog 2019-07-29 12:22:22 -05:00
Justin Van Patten bb43f63d51
Backport Changelog entries from the docs repo (#2992)
https://www.pulumi.com/docs/reference/changelog/ contains changelog entries for older versions, but hasn't been kept up-to-date. We'll be removing those from that page, after having moved the older entries to the CHANGELOG.md in this repo, which this commit does.
2019-07-26 19:33:07 -07:00
CyrusNajmabadi 27113eb6a9
Rewrite all rows when screen height changes (#2990) 2019-07-26 11:36:20 -07:00
Luke Hoban 74854de490 Prepare for 0.17.26 2019-07-26 08:54:53 -07:00
Luke Hoban 7854227fcf Correctly calculate number of changes (#2985)
We were reporting the number of kinds of changes instead of the actual number of changes.

Fixes #2706
2019-07-25 22:40:08 -07:00
Alex Clemmer c4b3745961 Signal policy publish operation completion to the service
Fixes pulumi/pulumi-policy#32
2019-07-25 15:21:07 -07:00
Chris Smith 18bfca421b
Minor README.md changes (#2983)
* Minor README.md changes

* Address PR feedback

* Address PR feedback
2019-07-25 14:44:41 -07:00
James Nugent 54fde111a7
Merge pull request #2984 from pulumi/jen20/replace-glog
Depend on `pulumi` fork of `glog`.
2019-07-25 16:43:55 -05:00