Commit graph

4640 commits

Author SHA1 Message Date
Pat Gavlin
b4daf94c2f
[codegen] Add support for caching package schemas. (#4534)
If a single process is going to bind and generate multiple programs, it
is useful to be able to cache package schemas in order to avoid the
(large) overhead of deserializing schemas multiple times.
2020-04-30 13:22:24 -07:00
Pat Gavlin
72a6add300
[codegen/python] Decrease alloc volume in PyName. (#4533)
Use strings.Builder instead of raw slices. We could go further here and
collapse to a single, ~right-sized bulder at the cost of complexity in
the `stateAcronym -> stateLowerOrNumber` transition.

Also, eliminate the pyName function, as it is redundant.
2020-04-30 13:22:13 -07:00
Chris Smith
7ed4e42c38
Enable container runtime tests for cron jobs (#4509)
* Enable container runtime tests for cron jobs

* Use VERSION var from Makefile

Co-authored-by: Paul Stack <public@paulstack.co.uk>

Co-authored-by: Paul Stack <public@paulstack.co.uk>
2020-04-30 12:52:05 -07:00
Luke Hoban
edf8bf5c30
Support map-typed inputs in Go SDK RegisterResource (#4521)
Adds support for RegisterResource to accept map-typed implementations if Input as well as the existing struct-typed implementations. Currently these must be fully untyped - but both map[string]pulumi.Input and map[string]interface{} are allowed. In the future, it's plausible that a mode where the data itself is a map, but the ElementType implementation returns a struct could be supported, with the struct used to provide type information over the untyped map.
2020-04-30 11:56:47 -07:00
Justin Van Patten
653dcf8f1f
Don't call IMocks.NewResourceAsync for the root stack resource (#4527) 2020-04-30 10:38:48 -07:00
Paul Stack
f06e48b414
Enable fish completions for pulumi cli (#4401) 2020-04-30 15:45:57 +01:00
stack72
d3ee61cfef Cleanup after v2.1.0 release 2020-04-29 21:49:21 +01:00
stack72
675c878364 Prepare for v2.1.0 release 2020-04-29 21:45:35 +01:00
Justin Van Patten
16926504c1
Allow pulumi.export calls from unit tests (#4518)
This change allows importing modules with calls to `pulumi.export` in unit tests. Previously, you'd have to structure the Python program in a way that avoids the `pulumi.export` from being called from unit tests.
2020-04-29 10:03:20 -07:00
Lee Briggs
82bb147ccf
Merge pull request #4506 from pulumi/community_prs
Don't try decrypt values on community PRs
2020-04-28 18:02:20 -07:00
Levi Blackstone
d1ba572e1d
Fix infinite recursion bug for Go SDK (#4516)
gatherDependencySet was not checking for Resources
in the dependency set, which could lead to infinite
recursion.
2020-04-28 18:10:07 -06:00
Lee Briggs
c5f9c2cca6
Don't skip npm tests 2020-04-28 14:13:56 -07:00
Lee Briggs
19587f5aa6
Rename skipIfShortFunction
As per feedback, use a more realistic name about what this function
does, including skip if there's no pulumi access token
2020-04-28 13:49:55 -07:00
Lee Briggs
06e6603475
Use PULUMI_ACCESS_TOKEN to skip tests 2020-04-28 10:09:39 -07:00
Lee Briggs
27f9f5c359
Don't try decrypt values on community PRs
When a community member sends a pull request to the repo, travis can't
decrypt some environment variables which include decrypting the GCP
credentials.
In addition to this, there are a few tests that run that require the
`PULUMI_ACCESS_TOKEN` which can't be used.

This PR does 2 things:

- Adds a check to the GCP credentials decryption which checks the source
  of the PR (whether it's from within the local repo, or a fork)
- Sets an environment variable: `COMMUNITY_PRS` which is used downstream
  during some tests. If the var exists, some tests are skipped

This should enhance the experience for community pull requests
significantly

Fixes #4508
2020-04-27 20:32:29 -07:00
Praneet Loke
7b17463031
[codegen/docs] Fix the generation of Function names, args, and result type names (#4490)
* Add a new DocLangHelper interface method to generate function names per language. Use the functionNames override map in Go to correctly generate a function name.

* Add kong to the title lookup map.

* Check if item was found in map.

* Use title case for the nodejs Function args type name. Use title case for the function name in the index page.

* Also fix the result name for a Function in nodejs to use title case.

* Use the module name to lookup the package.

* Use the title-case name for the Function name in the index page. Fix the language value passed to the lang chooser in function.tmpl.

* Use title case for nested type titles.

* Add title lookup for GitHub.
2020-04-27 17:47:01 -07:00
Komal
0a65bb620c
Merge pull request #4502 from pulumi/komalali/dotnet-updates
Updating .NET references
2020-04-27 13:29:58 -07:00
komal
b555286042 Updating .NET references 2020-04-27 12:42:11 -07:00
Lee Briggs
8d7cb5d99a
Merge pull request #4489 from pulumi/jaxxstorm/ordered_secrets
Order secret outputs in stack references
2020-04-27 09:36:29 -07:00
kahkeng
2fbd4c021c
Add helm env variables explicitly to pulumi Dockerfile (#4474) 2020-04-27 10:15:01 -06:00
Lee Briggs
f4236ffcd3
Improve comment for output sorting
Co-Authored-By: Justin Van Patten <jvp@justinvp.com>
2020-04-25 12:37:05 -07:00
Lee Briggs
bea7aa2c07
Update CHANGELOG.md to include correct PR
Co-Authored-By: Justin Van Patten <jvp@justinvp.com>
2020-04-25 12:36:44 -07:00
Pat Gavlin
2e9499a000
[codegen/hcl2] Fix the apply rewriter. (#4486)
Some of the apply rewriter's assumptions were broken by the richer
expressions available in HCL2. These changes fix those broken
assumptions, in particular the assumption that only scope traversal
expressions are sources of eventual values.
2020-04-24 22:04:24 -07:00
Komal
21ccfb8de7
Merge pull request #4455 from pulumi/komalali/increase-grpc-message-size
GH-4155 - Increase gRPC message size
2020-04-24 19:02:49 -07:00
Komal
c7866108e1
Merge branch 'master' into komalali/increase-grpc-message-size 2020-04-24 17:54:32 -07:00
Luke Hoban
cfa57914a1
[sdk/python] Improve ResourceOptions.merge type (#4484)
* [sdk/python] Improve `ResoruceOptions.merge` type

The implementation correctly handles `None` inputs, so the type should allow these as well.

* Add CHANGELOG
2020-04-24 17:45:11 -07:00
Komal
0f424e73ce
Merge pull request #4491 from pulumi/komalali/remove-dotnet-preview
Remove "preview" language from dotnet readme
2020-04-24 15:06:38 -07:00
Komal
6f49d990f7
Remove preview language from dotnet readme. 2020-04-24 13:54:41 -07:00
Komal
1d6af57442
Merge branch 'master' into komalali/increase-grpc-message-size 2020-04-24 13:42:54 -07:00
komal
94ac46c2ad Skip node test on windows 2020-04-24 13:40:09 -07:00
Pat Gavlin
dc2d91e294
[codegen/hcl2] Separate binding and typechecking. (#4483)
This allows consumers to change the inputs to an expression and re-run
typechecking to compute the expression's new type.
2020-04-24 08:52:52 -07:00
Pat Gavlin
af344d9b72
Fix Python module names. (#4473)
In particular, ensure that they are keyword-safe. This affects
`aws:lambda:*` in particular: prior to these changes, we were generating
code into `pulumi_aws.lamdba`, which is not referencable due to its use
of the `lamdba` keyword. With these changes, we generate code into
`pulumi_aws.lambda_`.

There is also a small fix for multi-line non-formatted strings: these
strings do not need escaped braces.
2020-04-24 08:52:36 -07:00
Pat Gavlin
739634c702
Merge pull request #4475 from pulumi/pgavlin/applies
Apply rewriter: separate global and expr data
2020-04-24 08:52:14 -07:00
Lee Briggs
043f5d87d4
Merge pull request #4476 from jaxxstorm/io-log-messaging
Change the wording of some IO errors
2020-04-24 08:45:26 -07:00
komal
2776a80a14 remove unneeded types 2020-04-23 17:58:17 -07:00
komal
6a869fa0f3 fix c# channel option 2020-04-23 17:30:23 -07:00
Paul Stack
090f390d7b
Ensure that DotNet codegen marks Deprecated classes as obsolete (#4482)
Related: https://github.com/pulumi/pulumi-terraform-bridge/issues/133
2020-04-24 01:18:29 +01:00
Lee Briggs
b9f44813fb
Order secret outputs in stack references
When referencing `secretOutputNames` in from another stack, spurious
diffs can often be created because the secret output slice was not
ordered.

This PR orders the slice before it's added to the propertymap, ensuring
the order always remains the same
2020-04-23 15:57:20 -07:00
komal
caf85f344e remove semicolon 2020-04-23 12:52:47 -07:00
komal
61def90966 fix extra line in changelog 2020-04-23 11:24:09 -07:00
komal
0139b8f512 fix c# test 2020-04-23 11:21:19 -07:00
komal
3766c4f05d fix imports 2020-04-23 11:21:19 -07:00
komal
cacb2ab873 remove unneeded requirement 2020-04-23 11:21:19 -07:00
komal
4fd5c4b4d5 shorten unnecessary gitignore 2020-04-23 11:21:19 -07:00
komal
383ab9602d add large resource integration tests for each language 2020-04-23 11:21:19 -07:00
komal
28d69e963e add tests for node and python 2020-04-23 11:16:36 -07:00
Komal Ali
066e27766c add explanation of constant 2020-04-23 11:16:36 -07:00
Komal Ali
9cf635ad5a pr changes 2020-04-23 11:16:36 -07:00
Komal Ali
de41fecfdc fix python server options 2020-04-23 11:16:36 -07:00
Komal Ali
ab3fe9ac68 Update changelog 2020-04-23 11:16:36 -07:00