Commit graph

5192 commits

Author SHA1 Message Date
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
Justin Van Patten
d583bcb915
[codegen/nodejs] Remove unnecessary ctor overload (#5274)
An extra constructor overload was recently added to pass undefined state from
`get` for resources that do not have any state inputs (notably Kubernetes
resources). This ended up breaking PaC's `validateResourceOfType`, which relies
on type inference in common usage to determine the resource's args type based
on the signature of the constructor.

This constructor overload isn't necessary. Instead, we can remove it and modify
how the constructor is called inside `get`. This also makes it so we're not
exposing details about `get`'s implementation in the public API.
2020-09-02 09:09:41 -06:00
evanboyle
d3cf745c59 First pass at Automation API README 2020-09-01 23:28:46 -07:00
Levi Blackstone
5ec0b985d4
[codegen/nodejs] Fix omitted output properties in constructor (#5273)
Changed the codegen in 6fd72dc0 but missed a condition that
is causing incorrect code in pulumi-kubernetes. This change
correctly generates inputs in both conditional branches.
2020-09-01 17:56:38 -06:00
Levi Blackstone
6fd72dc0db
[codegen/nodejs] Fix constructors to populate inputs on get (#5272) 2020-09-01 16:37:03 -06:00
Evan Boyle
a0275ffbd1
check for nil resource and invoke options in go sdk (#5270) 2020-09-01 09:59:27 -07:00
Lee Briggs
6329951499
Merge pull request #5264 from pulumi/jaxxstorm/go-test-replace
improve go mod replace logic
2020-08-31 20:28:43 -07:00
Lee Briggs
f5a54cf6bb
add more tests 2020-08-31 19:01:23 -07:00
Lee Briggs
ed94132080
make function name clearer 2020-08-31 18:57:05 -07:00
Lee Briggs
0459767ceb
handle cases with no subpackages 2020-08-31 18:54:14 -07:00
Lee Briggs
6c2f7994fa
refactor and add tests 2020-08-31 16:08:15 -07:00
Lee Briggs
759019a7ad
use string index to calc package name 2020-08-31 15:36:02 -07:00
Lee Briggs
40745c126c
improve go mod replace logic
this commit updates the way we do the go mod replace during tests
2020-08-31 13:45:10 -07:00
stack72
c5c6f7c780 Prepare for v2.9.2 release 2020-08-31 17:15:42 +01:00
Evan Boyle
741485d7d0
expose execution kind via update metadata (#5258) 2020-08-31 09:07:59 -07:00
Justin Van Patten
d13b840b43
Update changelog (#5261) 2020-08-31 08:58:43 -07:00
Evan Boyle
766bf10c15
Merge pull request #4977 from pulumi/evan/auto
Automation API - Go SDK Alpha
2020-08-28 20:25:19 -07:00