Commit graph

4279 commits

Author SHA1 Message Date
Mikhail Shilkov 8e87b2b893
Relax the type check to accomodate what YAML parser returns (#4023)
Relax the type check to accomodate what YAML parser returns
2020-03-05 16:41:31 +01:00
Pat Gavlin dbb5b04d2f Update the CHANGELOG for v1.12.0 2020-03-04 13:35:45 -08:00
Luke Hoban 094df2b794
Merge pull request #4016 from Carlangueitor/fix-typehint-output
Python SDK fix type annotations for `Output.all` and `Output.concat`
2020-03-03 20:32:55 -08:00
Charly Román 560f1f130e Python SDK fix type annotations for Output.all and Output.concat 2020-03-03 22:00:37 -06:00
Evan Boyle 3b8ffd5731
Go SDK fix panic when dest is struct and input is ptr (#3986) 2020-03-03 09:07:06 -08:00
Erin Krengel e9ea78cabb
remove UpdatePolicyPackConfig from UpdatePolicyGroupRequest (#4011) 2020-03-02 15:40:54 -08:00
Justin Van Patten acd6a5e753
Don't mark policy and watch commands as experimental (#4001) 2020-03-02 14:23:40 -08:00
Tasia Halim c96271b7a3
Support transformations in Go (#3978)
* started transformations for go sdk

* added first basic test

* added second test with child

* added RegisterStackTransformation

* added a couple tests to lifecycle_test

* update CHANGELOG and test

* included TODO for #3846
2020-03-02 13:59:11 -08:00
Paul Stack dbb800834d
Merge pull request #3898 from pulumi/windows-builds-on-gha
Build the windows build on GHA rather than AppVeyor
2020-03-02 23:04:23 +02:00
Evan Boyle cd0025edb5
properly check for nil input or nil input pointer (#4010) 2020-03-02 12:48:30 -08:00
Luke Hoban d9a18f0aa8
Revert back to ts-node ^7.0.0 (#4007)
We upgraded to `ts-node@^8.0.0`  2.5 months ago as part of https://github.com/pulumi/pulumi/pull/3627, though it seems it wasn't really necessary to make that update for the purposes of the PR - updating the default TypeScript version.

The `8.0.0` series of `ts-node` unfortunately dropped all of it's caching support, due to what appear to be some corner-case correctness issues with the cache.  We have not seen reports of those issues for Pulumi, and have much more experience with the `7.0.0` series overall (2 years vs. 2 months).  The performance difference between `7.0.0` and `8.0.0` of ts-node for Pulumi is massive - it adds 4-4.5s to each of `pulumi preview` and `pulumi up` even on a trivial program.

As a result, for now we will revert back to `ts-node@^7.0.0`.  In the future, we may want to look into our own caching layer or alternative to `ts-node` to ensure we get the behaviour and performance we expect.

Part of #3671.
2020-03-02 08:33:01 -08:00
Luke Hoban 2067e27ee6
Avoid configuring providers twice during preview (#4004)
In the very common case where provider configuration does not change, during preview we were calling `Configure` on the cloud provider twice - once for the "old" configuration, and once for the "new" configuration.

This is not necessary, and we can just avoid using the new provider when configuration has not changed, since we will have configured the old provider very early so if we can use that we should.

Note that this technically doesn't prevent the second call to `Configure` from being made, but it prevents us from ever waiting on it.  We may want to go further and avoid even calling `Configure` on the provider in this case.

Part of #3671.
2020-03-01 14:41:46 -08:00
James Nugent 60eeff3265
Merge pull request #3990 from pulumi/jen20/main-dockerfile-for-proto
Update gRPC library used in Go SDKs and regenerate code with latest tools
2020-02-29 12:46:46 +00:00
Pat Gavlin 682dced40b
Mock resource monitor (#3738)
These changes add support for mocking the resource monitor to the NodeJS
and Python SDKs. The proposed mock interface is a simplified version of
the standard resource monitor that allows an end-user to replace the
usual implementations of ReadResource/RegisterResource and Invoke with
their own. This can be used in unit tests to allow for precise control
of resource outputs and invoke results.
2020-02-28 17:22:50 -08:00
Chris Smith 9d1edad65c
Improve error message for policy pack not found (#3967) 2020-02-28 12:48:53 -08:00
Evan Boyle 3627f4ce70
ignore internal properties when unmarshaling (#3996) 2020-02-28 10:01:35 -08:00
James Nugent a1b55192dd Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
James Nugent 652bc7ab75 Upgrade Go gRPC library in go.mod 2020-02-28 11:52:22 +00:00
James Nugent a291c44a0f Update protogen script to use build container
This updates the protocol buffers generation script in the SDK to use
the main Pulumi Build Container instead of a custom Docker image.

Note there are some path differences owing to the manner in which the
tools are installed in the Build Container, however the actual tool
instantiations are very similar.
2020-02-28 11:52:22 +00:00
Pat Gavlin 24b93e4c10 Address PR feedback from #3980. 2020-02-27 16:24:13 -08:00
Pat Gavlin ccde31b713
Add support for extracting schemas from providers. (#3984)
These changes add a new method to the resource provider gRPC interface,
`GetSchema`, that allows consumers of these providers to extract
JSON-serialized schema information for the provider's types, resources,
and functions.
2020-02-27 16:10:47 -08:00
Pat Gavlin f42d7e756a
Add an HCL2 syntax helper package. (#3980)
These changes add a helper package for parsing HCL2 syntax files. The
helpers are intended to provide direct access to syntax elements that
are abstracted away by the standard HCL2 parser. The bulk of the code
deals with mapping syntax nodes to their relevant tokens in order to
avoid losing information about the comments associated with syntax
nodes.
2020-02-27 12:49:15 -08:00
Justin Van Patten db559214e8
Initial schema-based docs gen (#3988)
Many TODOs and follow-ups remain, but this is the start of our
schema-based docs generation.
2020-02-27 10:04:34 -08:00
stack72 985084651c Trying to build the windows build on GHA rather than AppVeyor 2020-02-27 17:11:39 +02:00
Levi Blackstone 0931c0d419
Fix missing module import on Windows platform (#3983)
#3895 added a module import that apparently doesn't
exist on Windows. Check the platform before importing,
and skip this import for Windows.
2020-02-26 16:08:49 -07:00
Pat Gavlin 8a0987c892 Update the CHANGELOG for 1.11.1. 2020-02-26 10:42:45 -08:00
Erin Krengel 111c63fbe9
fix permalink (#3970) 2020-02-26 09:45:39 -08:00
James Nugent ec539bbb6c
Merge pull request #3977 from pulumi/jen20/remove-pkg-errors-from-sdk
Remove use of `github.com/pkg/errors` from Go SDK
2020-02-26 17:39:11 +00:00
James Nugent 666c5d5cdc Remove use of github.com/pkg/errors from Go SDK
In preparation for publishing a separate module of the Go SDK for Pulumi
on which providers can depend, we should reduce the dependency footprint
so as to cause end users as few issues as possible with transitive
dependency versioning.

This commit removes all use of `github.com/pkg/errors` from the Go SDK
to that end, replacing it with the standard `errors` package and `fmt`
for error formatting where appropriate. We use the new (as of Go 1.13)
"%w" syntax for wrapping errors, so this code is no longer compatible
with Go 1.12.
2020-02-26 16:27:07 +00:00
Evan Boyle 930adc0504
Add support for secrets in Go SDK (#3938) 2020-02-25 17:45:36 -08:00
Pat Gavlin 0aa208a306
Add comments to Go output resolution (#3975) 2020-02-25 13:26:43 -08:00
Erin Krengel 1ce3d09a4b
add orgName as subdir to policies cache dir (#3971) 2020-02-25 09:38:58 -08:00
Erin Krengel e660937bab
use version tag (#3961) 2020-02-24 17:11:56 -08:00
Erin Krengel 5e31ac9f9c
Add disabled to enforcement level type (#3969) 2020-02-24 16:20:23 -08:00
Justin Van Patten e48a585b1a
Fix panic on failed stack policy (#3960)
Avoid panic during stack validations. This regressed recently when the PAC error output was modified.
2020-02-24 07:04:35 -08:00
Lee Zen 33b232adc4
Fix a regression for CustomTimeouts in Python SDK (#3964)
* Fix a regression for CustomTimeouts in Python SDK
* Accept dict as well as CustomTimeouts object
2020-02-22 19:32:06 -08:00
spara 24a1cc433a Merge branch 'master' of https://github.com/pulumi/pulumi into spara/python_instructions 2020-02-21 15:51:30 -06:00
spara 9b5c431def relaxed lintin 2020-02-21 15:50:09 -06:00
Evan Boyle 67838d8711
Marshal non-string provider config (#3948) 2020-02-21 12:55:27 -08:00
Luke Hoban 5bd954edf6
Include dep ensure step in pulumi new output. (#3949) 2020-02-21 06:41:33 -08:00
Mikhail Shilkov 42d1a606a4
Simplify resource options (#3943)
Simplify resource options, making the base class abstract
2020-02-21 09:24:52 +01:00
Pat Gavlin 259b2d314a Update the CHANGELOG for 1.11.0 2020-02-20 10:11:12 -08:00
Erin Krengel aacf4bbc10
Add policy config apitypes (#3872) 2020-02-19 10:06:11 -08:00
Luke Hoban 4eb2b555fe
Disable interactive progress display when no terminal size is available (#3936)
It appears there are cases where our IsInteractive heuristics return true, but terminal.GetSize returns an error. In these cases, we should assume we do not have an interactive terminal and avoid trying to render interactive progress by default.

Fixes #3935.
2020-02-19 09:21:03 -08:00
Lee Zen f6402882c2
Regression tests for StackReference in the Python SDK (#3913)
* Make Python StackReference test similar to others (with two steps)
* Include new Python StackReference integration test that uses multiple stacks
* Expose various life cycle methods for ProgramTester
2020-02-17 10:40:46 -08:00
Luke Hoban eee99e6011
Revert "Fix getting logs in tests for Lambdas" (#3923)
* Revert "Use test helper. (#1977)"

This reverts commit e498cab239.

* Avoid duplicate newlines

Ensure that we print exactly one trailing newline per log entry.
2020-02-13 22:38:12 -08:00
Jamie Kinkead abd1b98003
improve PAC error output (#3881)
* Improve pac error output

* Print policy packs applied if no violations present

* Remove unnecessary policyInfo struct

* Adjust integration test
2020-02-13 15:16:46 -08:00
Chris Smith ba046b063b
Add --version flag to 'pulumi stack export' (#3906)
* Add --version flag to 'pulumi stack export'

* Update CHANGELOG

* Update/rebase with latest

* Fix lint warning
2020-02-13 12:25:57 -08:00
Lee Zen 54d344f7c1
Serialize CustomTimeouts in Python SDK (#3920)
* Translate CustomTimeouts properly for RPC serialization
* Include integration test for custom timeouts
2020-02-13 10:40:56 -08:00
Erin Krengel c18e513b67
Add version tag to apitypes (#3912) 2020-02-12 10:13:25 -08:00