Commit graph

4653 commits

Author SHA1 Message Date
Harrison Heck 5c912e4427
feat: use node 12 in docker image
Fixes #4344
2020-04-09 10:48:50 -04:00
Mikhail Shilkov 46dababc28
Add additional RunAsync overloads (#4286) 2020-04-09 16:43:43 +02:00
Levi Blackstone ca6e47277f
Handle const values in Go codegen (#4311) 2020-04-08 10:33:01 -06:00
Pat Gavlin e9d8ccd0cc
Move pulumi cmd sources into cmd/pulumi. (#4324)
Just what it says on the tin.
2020-04-07 15:53:20 -07:00
Evan Boyle f50fd69c10
Define merge behavior for go resource options (#4316) 2020-04-07 14:19:33 -07:00
Praneet Loke efaa026196
Make sure there is a new-line between the package description and the first header on the index page. (#4312) 2020-04-07 12:27:35 -07:00
Paul Stack e7448050c6
Merge pull request #4323 from pulumi/fix-go111module-on-windows
Fixup GO111MODULE on Windows
2020-04-07 20:22:12 +01:00
Mikhail Shilkov 1d171dbb74
Add Output.All overloads (#4321)
Add Output.All overloads
2020-04-07 20:51:05 +02:00
stack72 9348728648 Fixup GO111MODULE on Windows 2020-04-07 19:37:28 +01:00
Pat Gavlin 00f1433706
HCL2/NodeJS: fix proxy apply lowering for promises (#4317)
Applies cannot be proxied when the applied value is a promise.

Fixes #4315.
2020-04-07 09:25:50 -07:00
Pat Gavlin 2f22c1c59c
HCL2 updates (#4309)
Pulumi HCL2 IR:
- Add support for invokes
- Add support for resource options, incl. ranged resources
- Allow the apply rewriter to ignore promise-typed values
- Add tests for the binder
- Add support functions for TF: entries and range

NodeJS codegen:
- Simplify for expression codegen
- Add support for invoke codegen
- Add support for entries and range functions
- Add tests

Python codegen:
- Implement codegen for most expression types
- Add support for invoke codegen
- Add tests
2020-04-06 19:43:16 -07:00
Praneet Loke 50e1086124 Make sure there is a new-line between the package description and the first header on the index page. 2020-04-06 17:43:21 -07:00
Praneet Loke 22aeaa43b1
Move resource docs index file generation to Go templates (#4308)
* Add new templates for generating index files. Remove the now irrelevant code.

* Add comment for generating index files by deduping module names. Use the path format of a module name as the link.

* Add a trailing slash for module links in the index page.

* Move the categories rendered in the index file into their own template file. Handle kubernetes provider specific module name conversion while generating parent modules.

* Fix issue with the k8s provider resource being generated as a module rather than a resource on the package-level index page.

* Show the deprecation message of a resource at the top of the document.

* Move k8s specific things to its own file.

* Add title attribute to the list items. Show the last part of a module name, in case it contains path separators

* Lookup the package name from the Go language info object for k8s then use that to lookup the C# namespace.

* Move the logic for cleaning a property type string for display names to a separate function.

* Export the title function from go and dotnet code generators for use in the resource doc generator. Use the title function from the respective lang code gens to match the correct title case used there. Fix issue with the Kubernetes namespace not being stripped for C# property type strings.

* Skip including apiVersion and kind as input properties for Kubernetes until pulumi-kubernetes#1062 is merged.
2020-04-06 17:01:33 -07:00
Levi Blackstone d363be9de0
Propagate additionalSecretOutputs opt to Read in NodeJS (#4307) 2020-04-06 15:50:52 -06:00
Evan Boyle ab659aa0c1
Reimplement getRequiredPlugins for go sdk (#4297) 2020-04-06 12:30:40 -07:00
Lee Zen 4862d73186
Do not show the update version warning with --json flag (#4255)
Co-authored-by: Lee-Ming Zen <lee@pulumi.com>
2020-04-03 14:52:53 -07:00
Praneet Loke ea383991f2
Update resource docs generator to handle some k8s cases (#4270)
* Fix an issue with stripping the module name from type doc links in nodejs.

* Remove unused code that visited object types. Update the nested types code to account for types that may reference themselves. Added glog logging statements. Save the package-level language info objects, so we can use them later.

* Check if a type token has already been added as an input or an output type when collecting nested types.

* Rename appearsIn to typeUsage.

* Scan provider resource also using the special-case function if package is k8s.

* Simplify the display names for Pulumi types by removing the Pulumi prefix.
2020-04-03 11:26:52 -07:00
Mikhail Shilkov 6d32d575e0
Enable features in mock monitor (#4272) 2020-04-03 08:33:40 +02:00
Pat Gavlin b02a84b8d9
Add a code generator for Python programs. (#4285)
This code generator processes a bound Pulumi program represented using
an HCL2-based IR and converts it to an equivalent Python program.
2020-04-02 23:29:05 -07:00
Pat Gavlin 4ae2867a15
Add a code generator for NodeJS programs. (#4284)
This code generator processes a bound Pulumi program represented using
an HCL2-based IR and converts it to an equivalent NodeJS program.
2020-04-02 23:27:05 -07:00
Pat Gavlin 27ac065fdc
Add a package for binding HCL2 as Pulumi config. (#4105)
* Add a package for binding HCL2 as Pulumi config.

These changes add preliminary (read: incomplete) support for
representing Pulumi programs using HCL2. Language-specific code
generators can use this representation as a basis for understanding the
semantics of a Pulumi program.

* Appease the linter

* Updates to the Pulumi HCL2 projection

- config variables are now specified as `config <name> <type>`
- output variables are now specified as `output <name> <type>`
- apply arguments are assigned better names by the apply rewriters

* Update package references

* Appease the linter

* Remove an unused import
2020-04-02 22:36:13 -07:00
Mikhail Shilkov 0bce094dc1
Fix python mock's call (#4274)
Fix python mock's call
2020-04-03 07:28:52 +02:00
Pat Gavlin 742c047211 Remove an unused import 2020-04-02 22:09:50 -07:00
Pat Gavlin 1860b4f656 Appease the linter 2020-04-02 21:43:03 -07:00
Pat Gavlin e831ecbc0e Update package references 2020-04-02 21:25:30 -07:00
Pat Gavlin 2f5238f130 Updates to the Pulumi HCL2 projection
- config variables are now specified as `config <name> <type>`
- output variables are now specified as `output <name> <type>`
- apply arguments are assigned better names by the apply rewriters
2020-04-02 21:25:30 -07:00
Pat Gavlin 89c9401fad Appease the linter 2020-04-02 21:25:30 -07:00
Pat Gavlin aa655c6076 Add a package for binding HCL2 as Pulumi config.
These changes add preliminary (read: incomplete) support for
representing Pulumi programs using HCL2. Language-specific code
generators can use this representation as a basis for understanding the
semantics of a Pulumi program.
2020-04-02 21:25:30 -07:00
Pat Gavlin c5782115d2
Various updates to the HCL2 semantic model. (#4281)
- Improve support for printing and triva
- Add support for HCL2 type functions
- Add visitors for body items
2020-04-02 21:23:12 -07:00
Levi Blackstone e92b1b4e8d
Add schema support for constant values (#4283)
Some properties have constant values, such as the
apiVersion and kind for the Kubernetes provider. Add
a Const field to the Property schema to support this.
2020-04-02 21:47:07 -06:00
Pat Gavlin a597934b3c
Updates to the HCL2 syntax helpers. (#4282)
- Fix token mapping for template control structures
- Split tokens out into their own file
- Add factory methods for token types
2020-04-02 20:01:14 -07:00
Evan Boyle 3efbc3705d
Update go codegen to include usage hints on Input types (#4279) 2020-04-02 19:59:08 -07:00
Justin Van Patten 89ce65fcd8
Skip policy tests that cause concurrent Travis jobs to fail (#4278) 2020-04-02 15:45:00 -07:00
Justin Van Patten dd104a00a7
Propagate secretness correctly in Python apply (#4273)
* Propagate secretness correctly in Python `apply`

* Improve `apply` test coverage

* Update CHANGELOG.md
2020-04-02 13:01:29 -07:00
Justin Van Patten 9c82975478
Remove [PREVIEW] from policy commands (#4277) 2020-04-02 11:53:41 -07:00
Luke Hoban d018212adc
[codegen/docs] Skip adding Notes to package details if empty (#4275) 2020-04-02 11:26:11 -07:00
Luke Hoban 9e37741916
[Go] Ensure Apply handles nil output values (#4268)
Fixes #4247.
2020-04-01 17:39:01 -07:00
Luke Hoban a0f615ad09
Add package details and atttribution to schema (#4256) 2020-04-01 17:22:23 -07:00
Lee Briggs ffdf7355e2
Merge pull request #4266 from pulumi/jaxxstorm/py-version-fix
Suppress output correctly in git-diff
2020-04-01 13:37:48 -07:00
Lee Briggs b23903603b
Suppress output correctly in git-diff 2020-04-01 13:35:16 -07:00
Justin Van Patten 344885823e
Add Python support to pulumi policy new (#4263)
Instead of always running `npm install`, if the Policy Pack is Python, emit instructions on how to install dependencies. Also minor cleanup/refactoring.
2020-04-01 13:31:38 -07:00
Paul Stack 1abd75605f
Merge pull request #4264 from pulumi/fixup-running-docker-tests
Fixing up the running of docker tests due to new go mod structure
2020-04-01 20:23:48 +01:00
stack72 a3c79ffcfc Fixing up the running of docker tests due to new go mod structure 2020-04-01 19:12:55 +01:00
stack72 ee67501151 Prepare for v1.14.0 release 2020-04-01 17:54:16 +01:00
Paul Stack 9575fde952
Merge pull request #4259 from pulumi/backport-2.0-fixes
Backport some of the fixes regarding builds back to master
2020-04-01 15:39:20 +01:00
stack72 7c1105a8b5 Don't tag as dirty build when only go.mod or sum changes 2020-04-01 12:18:06 +01:00
stack72 1f8754b3e9 Change golint-ci to use timeout not deadline 2020-04-01 12:15:03 +01:00
Evan Boyle 8a8f424628
disable go plugin acquisition (#4257) 2020-03-31 23:00:35 -07:00
Luke Hoban dd9ed3c938
Support grpc-js plugin servers (#4253)
In order to support grpc-js gRPC servers, we need to slightly loosen
our checks on plugin readiness.  This change was already in the 2.x
branch, but porting back so that 1.x CLIs can also be compatible.

Fixes #4252.
2020-03-31 14:18:09 -07:00
Justin Van Patten a5ca20bbf2
Specify StringComparison.Ordinal to StartsWith (#4244)
StartsWith does a culture-sensitive comparison by default, and in this case, we really just want an ordinal comparison.
2020-03-31 08:24:58 -07:00