Commit graph

5216 commits

Author SHA1 Message Date
Komal
a334b60193
Only allow type-matching enum values (#5417)
* Only allow type-matching enum values

* More tests and fixes
2020-09-21 12:23:04 -07:00
Justin Van Patten
971a8bbacf Prepare for v2.10.2 2020-09-21 11:51:56 -07:00
Justin Van Patten
988ebd8b8e
[codegen/docs] Don't emit API links in Azure NextGen resource docs (#5421)
We're not going to generate language-specific API docs for the Azure NextGen provider, only resource docs. This change makes it so the resource docs do not emit any links to nonexistent API docs.
2020-09-20 11:56:52 -07:00
Justin Van Patten
5794a3f482
[sdk/python] Cast numbers intended to be integers to int (#5419)
We recently made a change to the Python codegen to emit `int` type annotations, instead of `float`, for properties that are typed as `schema.IntType`.

But the number values that come back from protobuf structs are always floats (like JSON), so we need to cast the values intended to be integers to `int`.
2020-09-19 21:09:53 -07:00
Luke Hoban
a2a64e55d0
Support recursive object types in pkg/codegen model (#5404)
Fixes #5228.
2020-09-18 17:29:21 -07:00
Vivek Lakshmanan
5027eddce6
Merge pull request #5415 from pulumi/vl/ImportBasePath
[codegen] Allow ImportBasePath to override presumed golang import path
2020-09-18 16:16:13 -07:00
Vivek Lakshmanan
a7680884eb Allow ImportBasePath to override presumed golang import path 2020-09-18 12:48:14 -07:00
Sean Holung
c6dcb67677
Add pulumi console command (#5368) 2020-09-18 12:47:18 -07:00
Vivek Lakshmanan
4bbf38dca1
Merge pull request #5414 from pulumi/vl/FixGoInvoke
[Codegen] Fix panics when running invokes with modules containing slashes
2020-09-18 12:38:31 -07:00
Vivek Lakshmanan
2a23af6892 Fix panics when running invokes with modules containing slashes 2020-09-18 11:15:56 -07:00
Paul Stack
7c258c77c3
change how secrets provider parameters are passed via automation api (#5402) 2020-09-17 19:57:27 +01:00
Levi Blackstone
ab70dd3d64
[sdk/go] Add missing Version field to invokeOptions (#5401) 2020-09-17 12:21:50 -06:00
Mikhail Shilkov
428225f992
[codegen/nodejs] Format dashed import for invokes (#5399) 2020-09-17 18:23:54 +02:00
Paul Stack
f1d0b31cda
Update the docs and examples for Automation API for private git repos (#5396) 2020-09-17 15:48:44 +01:00
Evan Boyle
dd51072507
skip test (#5394) 2020-09-16 14:38:27 -07:00
Komal
92a7d717a4
[codegen/schema] - Expand ObjectTypeSpec to ComplexTypeSpec (#5379)
Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2020-09-16 13:47:40 -07:00
Mikhail Shilkov
0d38c6737e
[codegen] Tweak docs and example generation for azure-nextgen (#5390)
[codegen] Tweak docs and example generation so that azure-nextgen is represented correctly
2020-09-16 20:11:56 +02:00
stack72
a7abb37b70 Prepare for v2.10.1 release 2020-09-16 16:02:33 +01:00
Mikhail Shilkov
573b95afaf
Add missing provider names for docs (#5374) 2020-09-16 11:28:34 +02:00
Lee Briggs
a02afc8882
add legacy aws keys (#5384)
* add legacy aws keys

* fix glob pattern

* fix pr build
2020-09-15 16:22:39 -07:00
Evan Boyle
0e3666cc36
Automation API - add recovery APIs (cancel/export/import) (#5369) 2020-09-15 14:20:58 -07:00
Mike Metral
4e6ea760db feat(autoapi): add GetPermalink for operation result 2020-09-15 10:49:02 -07:00
Justin Van Patten
11752af5d7
Fix typo in Node.js dynamic provider GRPC service (#5365) 2020-09-15 05:45:06 -07:00
Mikhail Shilkov
da1f25928d
[codegen] Adjust Go/Python package naming for Azure NextGen (#5373) 2020-09-15 13:56:58 +02:00
Evan Boyle
4744d9acd2
up concurrency to fix flaky test (#5372) 2020-09-15 12:24:39 +01:00
Mikhail Shilkov
07a923e494 Revert Go input/output generation 2020-09-15 12:36:04 +02:00
Mikhail Shilkov
3a16cf55f0
[codegen/dotnet] Don't append Result to mixed output type names (#5321) 2020-09-15 09:33:41 +02:00
Mikhail Shilkov
bbf403ba85
Do not generate unused input/output types in Go (#5345)
Do not generate unused input/output types in Go
2020-09-15 09:33:13 +02:00
Evan Boyle
c23ca46382
Automation API - add the ability to stream progress updates during up/refresh/destroy (#5367) 2020-09-14 18:56:04 -07:00
Evan Boyle
c05ac500da
[Automation API] remove stack name validation and fqsn enforcement (#5337) 2020-09-14 17:45:07 -07:00
Pat Gavlin
855f1fd1cd
Revise host mode. (#5317)
* Revise host mode.

The current implementation of host mode uses a `pulumi host` command and
an ad-hoc communication protocol between the engine and client to
connect a language host after the host has begun listening. The most
significant disadvantages of this approach are the communication
protocol (which currently requires the use of stdout), the host-specific
command, and the difficulty of accommodating the typical program-bound
lifetime for an update.

These changes reimplement host mode by adding engine support for
connecting to an existing language runtime service rather than launching
a plugin. This capability is provided via an engine-specific language
runtime, `client`, which accepts the address of the existing languge
runtime service as a runtime option. The CLI exposes this runtime via
the `--client` flag to the `up` and `preview` commands, which similarly
accepts the address of an existing language runtime service as an
argument. These changes also adjust the automation API to consume the
new host mode implementation.
2020-09-14 17:40:17 -07:00
Justin Van Patten
46c7c327dd
Install plugin dependencies (#5353)
When installing a plugin, if it contains a `PulumiPlugin.yaml` file with a `runtime` value of `nodejs` or `python`, install dependencies for the plugin.

For Node.js, `npm install` is run (or `yarn install` if `PULUMI_PREFER_YARN` is set).

For Python, a virtual environment is created and deps installed into it.
2020-09-14 13:54:26 -07:00
Paul Stack
aafe84d823
Add support for cloning private repos as part of automation API (#5333) 2020-09-14 20:24:57 +01:00
Gili Tzabari
0504780346
Update CHANGELOG.md (#5342)
Fixed typo
2020-09-14 18:29:07 +01:00
Justin Van Patten
5164725cb5
[codegen/python] Remove panic from PyName (#5341)
The codegen updates have been run against all providers, so there's no longer a need to keep the panic.
2020-09-14 08:42:01 -07:00
Justin Van Patten
5e06da464a
[codege/python] Use int as the type annotation for integers (#5309) 2020-09-11 14:56:29 -07:00
Justin Van Patten
4dd40e4490
[codegen/python] Use pulumi.runtime.to_json (#5308)
Non-string provider inputs must be projected as JSON formatted strings. The current codegen simply calls `json.dumps` for such properties, but this does not work for the new input types, which aren't JSON serializable.

To address this, make use of the new `pulumi.runtime.to_json` utility function, which is capable of serializing raw dicts and input types as JSON.
2020-09-11 14:27:36 -07:00
Paul Stack
9a46dad7d0
Add the ability to set the passphrase secrets provider to read from a passphrase file (#5327)
* Addthe ability to set the passphrase secrets provider to read from a passphrase file

* Feedback about removing newlines
2020-09-11 22:25:47 +01:00
Mikhail Shilkov
f0386bec8d
Prevent concurrency issues when completing tasks (#5324)
* Prevent concurrency issues when completing tasks
2020-09-11 14:34:43 +02:00
Justin Van Patten
dee923d99c
[codegen/python] Emit array types as Sequence (#5283)
We currently emit array types as `List[T]` for Python, but `List[T]` is invariant, which causes type checkers like mypy to produce errors when values like `["foo", "bar"]` are passed as args typed as `List[pulumi.Input[str]]`. Instead, we should move to using `Sequence[T]` which is covariant, and does not have this problem.

We actually already do this for `Dict` vs. `Mapping`, emitting map types as `Mapping[str, T]` rather than `Dict[str, T]` because `Mapping[str, T]` is covariant. This change makes us consistent for array types.
2020-09-10 14:54:27 -07:00
stack72
848a98d511 Prepare for v2.10.0 release 2020-09-10 19:30:56 +01:00
Paul Stack
9a74064d2b
Allow passing a non-default secrets provider to AutomationAPI (#5320) 2020-09-10 19:25:47 +01:00
Mike Metral
49152e6331 feat(autoapi): add Upsert methods for stacks 2020-09-10 09:49:49 -07:00
Vivek Lakshmanan
e84e0401f0
Speed up doc generation by avoiding repeated python language import (#5277)
Fixes https://github.com/pulumi/pulumi/issues/5184
2020-09-10 16:12:09 +02:00
Mike Metral
51c235352c feat(autoapi): add IsSelectStack404Error and IsCreateStack409Error 2020-09-09 17:13:50 -07:00
Mike Metral
3f445be494 fix(autoapi): return autoError for local_workspace ops 2020-09-09 17:13:50 -07:00
Justin Van Patten
80a52d383e
Simplify type assertion in unwrap.spec.ts (#5311) 2020-09-09 14:22:54 -07:00
Lee Briggs
0ac075ef8f
add initial pull-request workflow (#5276)
* add initial pull-request workflow

* run SDK test all

* add SDK tests

* fixup make targets

* add dist target

* revert back to 5 updates

* disable test

* add issue for test disabling
2020-09-09 13:37:03 -07:00
Justin Van Patten
1ddc09f561
[sdk/python] Add pulumi.runtime.to_json utility (#5307)
Non-string provider inputs must be projected as JSON formatted strings. The current codegen simply calls `json.dumps` for such properties, but this does not work for the new input types, which aren't JSON serializable.

This commit adds a new `pulumi.runtime.to_json` utility function to the core SDK, which is capable of serializing both raw dicts and input types as JSON. The codegen will be updated to make use of this new function rather than `json.dumps`.
2020-09-09 12:08:45 -07:00
Justin Van Patten
d0ba9fbdcd
[sdk/python] Add support for Sequence (#5282)
We currently emit array types as `List[T]` for Python, but `List[T]` is invariant, which causes type checkers like mypy to produce errors when values like `["foo", "bar"]` are passed as args typed as `List[pulumi.Input[str]]` (since `Input[str]` is an alias for `Union[T, Awaitable[T], Output[T]]`. To address this, we should move to using [`Sequence[T]`](https://docs.python.org/3/library/typing.html#typing.Sequence) which is covariant, and does not have this problem.

We actually already do this for `Dict` vs. `Mapping`, emitting map types as `Mapping[str, T]` rather than `Dict[str, T]` because `Mapping[str, T]` is covariant for the value. This change makes us consistent for array types.

These are the SDK changes necessary to support `Sequence[T]`.
2020-09-08 22:22:35 -07:00