Commit graph

3610 commits

Author SHA1 Message Date
CyrusNajmabadi daca809d09
Fix local file:// stacks on Windows. (#2696) 2019-05-02 16:52:00 -07:00
Sean Gillespie 70002f5864
Ignore events for providers prefixed with 'default' (#2691) 2019-05-02 10:34:07 -07:00
Matt Ellis 769cd7ce07
Merge pull request #2615 from pulumi/ellismg/scout-node-12
Support Node 12
2019-05-02 10:25:00 -07:00
Kraig Amador 7dac095d98
Updated CHANGELOG 2019-05-02 10:20:48 -07:00
Kraig Amador 23a52ec0bb
Documentation update to include a step missing that helps new users build Pulumi 2019-05-02 10:18:02 -07:00
Luke Hoban 3062ba7c4f
Move CHANGELOG entry for pulumi preview --json (#2690)
This was first released in `0.17.9` not `0.17.8`.
2019-05-01 12:39:18 -07:00
Matt Ellis de78ddb4b6 Update CHANGELOG.md 2019-05-01 10:05:33 -07:00
Matt Ellis 8979e301d1 Bump gRPC dependency to 1.20.2
This version has prebuilt binaries for Node 12.
2019-05-01 10:04:27 -07:00
Matt Ellis 9325b6ec61 Add logging to tests 2019-05-01 10:04:27 -07:00
Matt Ellis babbccc328 Run Node12 in CI
- Remove 6.10.X builds (NodeJS has EOL'd this release)
- Use 12.X in PRs
- Update other legs to latest 8.X and 10.X LTS versions
2019-05-01 10:04:27 -07:00
Justin Van Patten cde23669e2
pulumi new: Suppress npm warnings (#2685)
Right now, when we run `npm install` as part of `pulumi new`, the
following warnings are emitted:

```
node-pre-gyp WARN Using needle for node-pre-gyp https download

...

npm WARN aws-typescript@ No description
npm WARN aws-typescript@ No repository field.
npm WARN aws-typescript@ No license field.
```

We can suppress these warnings by specifying `--loglevel=error` to the
`npm install` command.
2019-05-01 09:17:53 -07:00
Justin Van Patten 55b233fbdc
Update CHANGELOG for 0.17.9 (#2687) 2019-04-30 11:01:58 -07:00
Justin Van Patten 95d51efe6a
pulumi new: Ensure the stack is selected (#2683)
Ensure the stack is selected when using `pulumi new` with an existing
stack (e.g. a stack created on app.pulumi.com).
2019-04-29 13:32:15 -07:00
Joe Duffy fcfaa641b6
Ignore spurious warning on Node.js 11 (#2682)
This fixes a nightly test failure that only occurs on Node.js 11,
due to the JSON output including a diagnostics message the Node.js
runtime prints to stderr during the test run.
2019-04-29 10:46:09 -07:00
Matt Ellis 823fd74586
Merge pull request #2680 from Frassle/skipupdatecheck
Provide an envvar to skip the update check
2019-04-27 14:03:23 -07:00
Fraser Waters 6a2c9ae4f8 Update CHANGELOG.md 2019-04-27 21:47:49 +01:00
Fraser Waters b8c000c351 Provide an envvar to skip the update check
For users in secure environments without internet access the update
check in pulumi causes a significant hitch on running any pulumi
command, as pulumi tries to access pulumi.com to get the latest version
and after a while times out.

This commit adds an envvar (PULUMI_SKIP_UPDATE_CHECK) that if set to "1"
or "true" will cause pulumi to skip the update check.
2019-04-27 21:37:26 +01:00
James Nugent 5c86e6c40a
Merge pull request #2676 from pulumi/lblackstone-patch-1
Update required Go version to 1.12+
2019-04-26 12:39:53 -04:00
Levi Blackstone b3da211b71
Update required Go version to 1.12+ 2019-04-26 10:13:13 -06:00
Joe Duffy 0b7086b72d
Merge pull request #2658 from pulumi/joeduffy/2390_preview_json
Add a --json flag to the preview command
2019-04-25 18:38:37 -07:00
joeduffy 019600719b Suppress header/footer in JSON mode
...and also switch back to printing these to stdout otherwise.
2019-04-25 18:01:51 -07:00
joeduffy 234c3dfec9 Add a --json flag to the preview command
This change adds a --json flag to the preview command, enabling
basic JSON serialization of preview plans. This effectively flattens
the engine event stream into a preview structure that contains a list
of steps, diagnostics, and summary information. Each step contains
the deep serialization of resource state, in addition to metadata about
the step, such as what kind of operation it entails.

This is a partial implementation of pulumi/pulumi#2390. In particular,
we only support --json on the `preview` command itself, and not `up`,
meaning that it isn't possible to serialize the result of an actual
deployment yet (thereby limiting what you can do with outputs, etc).
2019-04-25 17:37:16 -07:00
joeduffy 23f905a468 Respect --show flags for --json (and --diff) 2019-04-25 17:36:31 -07:00
joeduffy 250bcb9751 Add a --json flag to the preview command
This change adds a --json flag to the preview command, enabling
basic JSON serialization of preview plans. This effectively flattens
the engine event stream into a preview structure that contains a list
of steps, diagnostics, and summary information. Each step contains
the deep serialization of resource state, in addition to metadata about
the step, such as what kind of operation it entails.

This is a partial implementation of pulumi/pulumi#2390. In particular,
we only support --json on the `preview` command itself, and not `up`,
meaning that it isn't possible to serialize the result of an actual
deployment yet (thereby limiting what you can do with outputs, etc).
2019-04-25 17:36:31 -07:00
PLACE 70bc0436ed Add support for state in cloud object storage (S3, GCS, Azure) (#2455) 2019-04-24 20:55:39 -07:00
CyrusNajmabadi a602cccc3e
Properly mark members as @internal (#2670) 2019-04-23 19:24:06 -07:00
Mike Metral 24f08ddb0f Update CHANGELOG for 0.17.8 2019-04-23 13:21:56 -07:00
Sean Gillespie ad32d9d8ac
Plumb provider version through language hosts to engine (#2656)
* NodeJS: allow callers to override provider version

* Python: allow callers to override provider version

* NodeJS: add version for invoke

* Python: add version to invoke

* NodeJS: add tests for ReadResource

* Post-merge cleanup

* update doc comments
2019-04-23 11:02:51 -07:00
Sean Gillespie 2d875e0004
Remove uses of plugins in the snapshot (#2662) 2019-04-23 09:53:44 -07:00
Luke Hoban ce5737b389 Increase file descriptor limit on MacOS tests 2019-04-23 06:21:21 -07:00
Luke Hoban 0550f71a35
Add an ignoreChanges resource option (#2657)
Fixes #2277.

Adds a new ignoreChanges resource option that allows specifying a list of property names whose values will be ignored during updates. The property values will be used for Create, but will be ignored for purposes of updates, and as a result also cannot trigger replacements.

This is a feature of the Pulumi engine, not of the resource providers, so no new logic is needed in providers to support this feature. Instead, the engine simply replaces the values of input properties in the goal state with old inputs for properties marked as ignoreChanges.

Currently, only top level properties may be specified in ignoreChanges. In the future, this could be extended to support paths to nested properties (including into array elements) with a JSONPath/JMESPath syntax.
2019-04-22 13:54:48 -07:00
Joe Duffy 3b93199f7a Use Outputs instead of merged Inputs+Outputs (#2659)
Fixes #2650.

We have historically relied on merging inputs and outputs in several places in the engine. This used to be necessary, as discussed in #2650 (comment), but our core engine model has moved away from depending on this. However, we still have a couple places we do this merge, and those places have triggered several severe issues recently in subtle cases.

We believe that this merging should no longer be needed for a correct interpretation of the current engine model, and indeed that doing the merge actively violates the contract with providers. In this PR we remove the remaining places where this input + output merge was being done. In all three cases, we use just the Outputs, which for most providers will already include the same values as the inputs - but correctly as determined by the provider itself.
2019-04-22 13:52:36 -07:00
Chris Smith 0ede30fdb6
Build/Push pulumi/actions container with new SDK releases (#2646)
* Build/Push pulumi/actions container with new SDK releases

* Address PR feedback
2019-04-18 15:32:19 -07:00
Sean Gillespie bea1bea93f
Load specific provider versions if requested (#2648)
* Load specific provider versions if requested

As part of pulumi/pulumi#2389, we need the ability for language hosts to
tell the engine that a particular resource registration, read, or invoke
needs to use a particular version of a resource provider. This was not
previously possible before; the engine prior to this commit loaded
plugins from a default provider map, which was inferred for every
resource provider based on the contents of a user's package.json, and
was itself prone to bugs.

This PR adds the engine support needed for language hosts to request a
particular version of a provider. If this occurs, the source evaluator
specifically records the intent to load a provider with a given version
and produces a "default" provider registration that requests exactly
that version. This allows the source evaluator to produce multiple
default providers for a signle package, which was previously not
possible.

This is accomplished by having the source evaluator deal in the
"ProviderRequest" type, which is a tuple of version and package. A
request to load a provider whose version matches the package of a
previously loaded provider will re-use the existing default provider. If
the version was not previously loaded, a new default provider is
injected.

* CR Feedback: raise error if semver is invalid

* CR: call String() if you want a hash key

* Update pkg/resource/deploy/providers/provider.go

Co-Authored-By: swgillespie <sean@pulumi.com>
2019-04-17 11:25:02 -07:00
Matt Ellis f78c2f58f6 Update CHANGELOG.md for release 2019-04-17 08:19:52 -07:00
Joe Duffy 644d5dc916
Enable unit testing for Pulumi programs (#2638)
* Enable unit testing for Pulumi programs

This change enables rudimentary unit testing of your Pulumi programs, by introducing a `PULUMI_TEST_MODE` envvar that, when set, allows programs to run without a CLI. That includes

* Just being able to import your Pulumi modules, and test ordinary functions -- which otherwise would have often accidentally triggered the "Not Running in a CLI" error message
* Being able to verify a subset of resource properties and shapes, with the caveat that outputs are not included, due to the fact that this is a perpetual "dry run" without any engine operations occurring

In principle, this also means you can attach a debugger and step through your code.

* Finish the unit testing features

This change

1) Incorporates CR feedback, namely requiring that test mode be
   explicitly enabled for any of this to work.

2) Implements Python support for the same capabilities.

3) Includes tests for both JavaScript and Python SDKs.

* Add a note on unit testing to the CHANGELOG

* Use Node 8 friendly assert API

* Embellish the CHANGELOG entry a bit
2019-04-16 22:20:01 -07:00
Sean Gillespie 47a2acaa7b
Protobuf changes for provider versioning (#2642)
In pursuit of pulumi/pulumi#2389, this commit adds the necessary changes
to the resource monitor protocol so that language hosts can communicate
exactly what version of a provider should be used when servicing an
Invoke, ReadResource, or RegisterResource. The expectation here is that,
if a language host provides a version, the engine MUST use EXACTLY that
version of a provider plugin in order to service the request.
2019-04-16 10:06:43 -07:00
Levi Blackstone bdc687e654
Add a note about quoting to state delete doc (#2641) 2019-04-11 16:10:28 -06:00
Levi Blackstone 2532ce0527
Update changelog for 0.17.6 release (#2639) 2019-04-11 11:53:17 -06:00
Alex Clemmer fac6944781 Warn instead of error when refresh'd resource is unhealthy
Fixes #2633.

Currently when a user runs `refresh` and a resource is in a state of
error, the `refresh` will fail and the resource state will not be
persisted. This can make it vastly harder to incrementally fix
infrastructure. The issue mentioned above explains more of the
historical context, as well as some specific failure modes.

This commit resolves this issue by causing refresh to *not* report an
error in this case, and instead to simply log a warning that the
`refresh` has recognized that the resource is in an unhealthy state
during state sync.
2019-04-10 16:43:33 -07:00
James Nugent ef5e148a73
Merge pull request #2613 from pulumi/jen20/go-modules
Initialize Go modules for pulumi/pulumi
2019-04-10 08:55:19 +04:00
James Nugent edab10e9c8 Use Go Modules for dependency tracking
This commit switches from dep to Go 1.12 modules for tracking Pulumi
dependencies. Rather than _building_ using Go modules, we instead use the `go
mod vendor` command to populate a vendor tree in the same way as `dep ensure`
was previously doing.

In order to prevent checksum mismatches, it was necessary to also update CI to
use Go 1.12 instead of 1.11 - which also necessitated fixing some linting errors
which appeared with the upgraded golangci-lint for 1.12.
2019-04-10 08:37:51 +04:00
CyrusNajmabadi 42812f9b28
Work around a legal code pattern that previous versions of TypeScript complain about. (#2631) 2019-04-08 11:21:01 -07:00
Matt Ellis 44292747d4 Collect logs from Google Cloud Functions
This change adds an operations provider for GCP. Right now, it can
just collect logs from google cloud functions, similar to `gcloud
functions logs read`
2019-04-08 09:44:05 -07:00
Joe Duffy cc7a657628
Make the Python SDK's Config.name argument optional (#2624)
This makes the Python SDK's Config constructor name argument
optional, similar to what we do in the Node.js SDK. If not supplied,
the current project name is used as the default.
2019-04-04 16:55:01 -07:00
Matt Ellis f3379b1190 Fix lint issue
A linter was correctly detecting a case where we were we were doing an
unneeded nil check on `err`. The previous clause in the if/else block
ensures that `err` is non nil.
2019-04-03 17:22:55 -07:00
CyrusNajmabadi 26b7bc7d26
Tweak how often we print 'in progress' messages during tests. (#2612) 2019-03-29 17:34:16 -07:00
CyrusNajmabadi 02f46811db
Add a SxS test for @pulumi/pulumi to help catch when we make breaking changes to core types. (#2610) 2019-03-29 12:27:42 -07:00
CyrusNajmabadi 1f51ec00fc
Revert 'Simplify API for passing providers to a ComponentResource (#2602)' (#2606) 2019-03-28 18:31:03 -07:00
CyrusNajmabadi 49a8e73aa7
Ensure that the values in 'dependsOn' are actually Resources. (#2605) 2019-03-28 17:27:51 -07:00