Commit graph

3845 commits

Author SHA1 Message Date
Daniel Ruf 4e99c354b3 Update the image URLs (#3112) 2019-08-20 07:42:25 -07:00
Paul Stack cfd3b8ce09
Allow Acceptance Tests to pass a flag that runs an upgrade test (#3110)
This will allow us to install a latest version from PyPi or NPM
and then yarn link / pip install from local machine and test that
no changes are introduced when this occurs

If the flag is not passed, then the dependencies are installed
as before where we prefer a local package to be linked / installed
2019-08-20 11:08:09 +03:00
CyrusNajmabadi 8290377cbd
Add some simple typechecking (#3109) 2019-08-19 13:19:16 -07:00
Matt Ellis 900046a6ed
Merge pull request #3089 from pulumi/ellismg/fix-2714
Fix issues in the filestate backend
2019-08-19 10:50:44 -07:00
Mikhail Shilkov 04b169a64b Add a hint about the org name in stack in pulumi new 2019-08-19 09:21:02 +02:00
Mikhail Shilkov 2a88bc8e7e Replace regex with a replacer 2019-08-19 08:28:34 +02:00
Mikhail Shilkov 7f672a1c50 Changelog 2019-08-19 08:28:34 +02:00
Mikhail Shilkov 82276e3418 Skip non-utf8 secrets when regexing logs 2019-08-19 08:28:34 +02:00
Matt Ellis b14e3d9c35 Do not use os package in filestate backend
Since the filestate backend is now written using the go-cloud blob
abstraction, places where we were using functions from the `os`
package were very unlikely to be correct.

This change removes their uses in favor of APIs provided by
go-cloud (which sometimes requires more work than before).
2019-08-16 13:42:27 -07:00
Matt Ellis 828086d638 Do not attempt to load checkpoint before saving a snapshot
For historical reasons, we used to need to require to load an existing
checkpoint to copy some data from it into the snapshot when saving a
new snapshot. The need for this was removed as part of the general
work in #2678, but we continued to load the checkpoint and then just
disregard the data that was returned (unless there was an error and
that error was not FileNotFound, in which case we would fail).

Our logic for checking if something was FileNotFound was correct when
we wrote it, but when we adopted go-cloud in order to have our
filestate backend also write to blob storage backends like S3, we
forgot that we had checks like `os.IsNotExists()` floating around
which were now incorrect. That meant if the file did not exist for
some reason, instead of going along as planned, we'd error out now
with an error saying something wasn't found.

When we write a checkpoint, we first "backed up" the initial version
by renaming it to include a `.bak` suffix, then we write the new file
in place. However, this can run afoul of eventual consistency models
like S3, since there will be a period of time in which a caller may
observe that the object is missing, even after a new version is
written (based on my understanding of [S3's consistency
model](https://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html#ConsistencyModel)

Since we no longer need to actually copy any information from the
previous checkpoint, we can simply remove the call entirely to load
it.

As a follow up, we need to audit places inside the filebased backend
that assume `os.*` functions are going to do what we want them to do,
since in general they will not.

Fixes #2714
2019-08-16 13:40:55 -07:00
Matt Ellis 342f8311a1 Fix renaming a freshly created stack using the local backend
Attempting to `pulumi stack rename` a stack which had been created but
never updated, when using the local backend, was broken because
code-paths were not hardened against the snapshot being `nil` (which
is the case for a stack before the initial deployment had been done).

Fixes #2654
2019-08-16 13:39:34 -07:00
Luke Hoban 82903927f1
Add CLI docs on --secrets-provider (#3099)
Part of pulumi/docs#1509.
2019-08-16 12:53:02 -07:00
Luke Hoban 3cc67cee86
Annotate preview features (#3098)
The `pulumi logs` and `pulumi history` commands are still in preview, even as `pulumi` itself will reach 1.0.  We now communicate this clearly in CLI help text.

The local and remote state backends are also still in preview, and this is annotated inline in the help text for the `pulumi login` command which is the entrypoint to this functionality.
2019-08-16 12:52:32 -07:00
Paul Stack f8db8e4209
Allow resource IDs to change on reresh steps (#3087)
* Allow resource IDs to change on reresh steps

This is a requirement for us to be able to move forward with
versions of the Terraform Azurerm provider. In v1.32.1, there was
a state migration that changed the ID format of the azure table
storage resource

We used to have a check in place for old ID being equal to new ID.
This has been changed now and we allow the change of ID to happen
in the RefreshStep

* Update pkg/resource/deploy/step.go

Co-Authored-By: Pat Gavlin <pat@pulumi.com>
2019-08-16 21:04:03 +03:00
Matt Ellis e20d72ff6e Only skip publishing docker images for -alpha builds.
Previously, we only published docker images for non-prerelease
builds. However, on our move to 1.0.0, we will be publishing a few
`-beta` (and perhaps one or more `-rc`) builds. These are high quality
builds we want folks to use. So, we will publish them to DockerHub and
update the `latest` tag, similar to what we do for NPM and PyPI.

I will manually publish 1.0.0-beta.2, but landing these changes means
that future releases will be published automatically

Fixes #3092
2019-08-16 11:02:42 -07:00
Matt Ellis 0bb4e6d70b Respond to PR feedback
Address post commit feedback from Cyrus on
pulumi/pulumi#3071
2019-08-15 12:42:51 -07:00
CyrusNajmabadi 20058f982d
Make 'ResourceOptions.merge' static so downstream clients don't have to manually handle None cases. (#3072) 2019-08-14 15:55:03 -07:00
Chris Smith 952b6d0d89
Remove some unused apitype fields (#3057) 2019-08-14 15:26:58 -07:00
Matt Ellis 8c31683c80
Merge pull request #3071 from pulumi/ellismg/fix-2744
Do not taint all stack outputs as secrets if just one is
2019-08-14 10:54:04 -07:00
Matt Ellis ff160ad704
Merge pull request #3037 from pulumi/ellismg/rejigger-tests
Run "integration" tests a package at a time
2019-08-14 10:03:50 -07:00
Matt Ellis c34cf9407e Add regression test 2019-08-13 16:12:20 -07:00
Matt Ellis 88901627c4 Update CHANGELOG.md 2019-08-13 16:12:20 -07:00
Matt Ellis 9308246114 Do not taint all stack outputs as secrets if just one is
When using StackReference, if the stack you reference contains any
secret outputs, we have to mark the entire `outputs` member as a
secret output. This is because we only track secretness on a per
`Output<T>` basis.

For `getSecret` and friends, however, we know the name of the output
you are looking up and we can be smarter about if the returned
`Output<T>` should be treated as a secret or not.

This change augments the provider for StackReference such that it also
returns a list of top level stack output names who's values contain
secrets. In the language SDKs, we use this information, when present,
to decide if we should return an `Output<T>` that is marked as a
secret or not. Since the SDK and CLI are independent components, care
is taken to ensure that when the CLI does not return this information,
we behave as we did before (i.e. if any output is a secret, we treat
every output as a secret).

Fixes #2744
2019-08-13 16:11:38 -07:00
Matt Ellis a383e412bc Do not print resources to stdout in a test
Since we now include output from `go test` (so we can see progress
from our integration tests as they run) we shouldn't print large blobs
of uninteresting JSON data.
2019-08-13 15:58:32 -07:00
Matt Ellis b20726b5a4 Run "integration" tests a package at a time 2019-08-13 15:58:32 -07:00
Pat Gavlin fdfef5f334
Update the NodeJS version compat checks. (#3083)
- Unify the 1.x.y series and the 0.17.z series
- Fix the check s.t. post-1.0, only the major versions are required to
  match
2019-08-13 15:40:25 -07:00
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