Commit graph

5358 commits

Author SHA1 Message Date
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
evanboyle 6cc095be07 changelog 2020-09-08 17:31:44 -07:00
Pat Gavlin 2585b86aa4
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.

Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.

The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.

These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).

An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.

This is the core of #2430.
2020-09-07 19:33:55 -07:00
Mike Metral 46da25492e feat(autoapi): add workspace scoped envvars to LocalWorkspace and Stack 2020-09-03 09:57:23 -07:00
Evan Boyle 9ef5c72f72
update go plugin acquisition to work for users who vendor dependencies (#5286) 2020-09-03 09:15:18 -07:00
Mikhail Shilkov 53b48cef2f
Exclude two more names from PyName (#5285) 2020-09-03 18:02:21 +02:00
Mike Metral dec6a6a49a refactor(autoapi-gitrepo): use Workspace in SetupFn callback 2020-09-02 19:15:40 -07:00
Albert Zhong 69c57f8b47
Add ignorePyNamePanic python flag (#5268) 2020-09-02 16:25:19 -07:00
Lee Briggs 09c73c1c9b
add build tags to all integration tests (#5271)
* add build tags to all integration tests

* fix go sdk imports

* make transformation Dirs global
2020-09-02 09:11:15 -07:00