Commit graph

4066 commits

Author SHA1 Message Date
Mikhail Shilkov 1a93049e71 Swap names of the tests 2019-08-23 19:08:57 +02:00
Mikhail Shilkov 17b55ef96e Restore the missing helper function 2019-08-23 19:08:57 +02:00
Mikhail Shilkov 7e7fc01d5b Refactor broken tests 2019-08-23 19:08:57 +02:00
Mikhail Shilkov a2769f385e Format 2019-08-23 14:45:29 +02:00
Mikhail Shilkov 6ac9770a46 Linter 2019-08-23 14:45:29 +02:00
Mikhail Shilkov 273ade2ac0 Parameterize the progress function with a message 2019-08-23 14:45:29 +02:00
Mikhail Shilkov 370047bbb6 Show a progress bar for plugin installation during pulumi up 2019-08-23 14:45:29 +02:00
Mikhail Shilkov ccc7ec145a Extend the test suite 2019-08-23 09:09:54 +02:00
Mikhail Shilkov c270204387 Check project existence during pulumi new 2019-08-23 09:09:54 +02:00
Mikhail Shilkov c88fcc4fb3 Review comment 2019-08-23 08:40:31 +02:00
Mikhail Shilkov b8aff4dfbd Add a hint about stack rm after successful destroy 2019-08-23 08:40:31 +02:00
Chris Smith eb0934970c
Add support for filtering stacks by organization, tag (#3108)
* Add support for filtering stacks by organization, tag

* Update CHANGELOG.md

* Address PR feedback

* Address even more PR feedback

* Support empty-string filters
2019-08-22 13:56:43 -07:00
Matt Ellis e349f3c094 Fix stack reference issue when running on a pre -beta.3 CLI
In #3071 we made change to the built in provider for `StackReference`
to return additional data about the names of outputs which were
secrets.  The SDKs uses this information to decide if it should mark a
stack output as secret when returning it's value from `getOutput`.

When using an older CLI which does not report this data, we hit an
error:

```
 TypeError: Cannot read property 'outputs' of undefined
```

This was caused by a refactoring error where we extracted a private
helper out of the StackReference class, but neglected to change one
instance of `this` to `sr`. While we do have tests that exercise this
feature, we would only see this bug when using an older CLI, and we
don't have automated tests here that use the neweset `@pulumi/pulumi`
with an older `pulumi` CLI
2019-08-22 11:55:02 -07:00
Matt Ellis 7696ed8e94 Prepare for 1.0.0-beta.3 release 2019-08-21 10:33:33 -07:00
Pat Gavlin 42fc75fffe
Fail read steps with missing resources. (#3123)
Just what it says on the tin.

Fixes #262.
2019-08-21 10:09:02 -07:00
CyrusNajmabadi 590114497e
Simplify merge code. (#3122) 2019-08-20 17:09:53 -07:00
Pat Gavlin 8745440c1b
Allow users to explicitly disable delete-before-replace. (#3118)
With these changes, a user may explicitly set `deleteBeforeReplace` to
`false` in order to disable DBR behavior for a particular resource. This
is the SDK + CLI escape hatch for cases where the changes in
https://github.com/pulumi/pulumi-terraform/pull/465 cause undesirable
behavior.
2019-08-20 15:51:02 -07:00
Paul Stack 2c0510a23e
Update the JSON representation of customTimeouts in state (#3101)
Omit them when empty and change the casing of Create, Update and
Delete
2019-08-21 01:01:27 +03:00
Fraser Waters a46357a0b3 Fix comment about QName regex (#3121)
The comment on QName explained that QNames match the Name regex, but
the regex written was slightly different to the actual Name regex
(missed that '.' is a valid char in each group).
2019-08-20 14:43:48 -07:00
ben-nagengast 638075e3e1 Fixing error message typo. "buy" -> "by" 2019-08-20 13:35:32 -07:00
CyrusNajmabadi d0a72fc24d
Allow ResourceOptions.id to be an Input in python (to match JS sdk). (#3116) 2019-08-20 12:18:48 -07:00
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