Commit graph

706 commits

Author SHA1 Message Date
Komal
ec9c02f578
Add tests for ts enums (#5605) 2020-10-22 10:53:29 -07:00
Komal
6949101428
Replace equal and deepEqual with strictEqual and deepStrictEqual (#5607) 2020-10-21 10:21:47 -07:00
Pat Gavlin
89c71bb49e
[cli] Add an import command. (#4765)
Co-authored-by: stack72 <public@paulstack.co.uk>
2020-10-14 12:51:53 +01:00
Pat Gavlin
249140242e
Add support for provider-side preview. (#5443)
These changes add support for provider-side previews of create and
update operations, which allows resource providers to supply output
property values for resources that are being created or updated during a
preview.

If a plugin supports provider-side preview, its create/update methods
will be invoked during previews with the `preview` property set to true.
It is the responsibility of the provider to fill in any output
properties that are known before returning. It is a best practice for
providers to only fill in property values that are guaranteed to be
identical if the preview were instead an update (i.e. only those output
properties whose values can be conclusively determined without
actually performing the create/update operation should be populated).
Providers that support previews must accept unknown values in their
create and update methods.

If a plugin does not support provider-side preview, the inputs to a
create or update operation will be propagated to the outputs as they are
today.

Fixes #4992.
2020-10-09 13:13:55 -07:00
Evan Boyle
b86e6ae93e
add plugin management utils to node Automation API (#5536) 2020-10-09 09:03:03 -07:00
evanboyle
42f301ac0f bump node test timeout 2020-10-08 12:19:01 -07:00
evanboyle
39297cb9dd make public declarations implicit 2020-10-08 12:19:01 -07:00
evanboyle
7b766924ec update error strategy to be more idiomatic 2020-10-08 12:19:01 -07:00
evanboyle
97e1d25802 update doc formatting 2020-10-08 12:19:01 -07:00
evanboyle
73a5516958 prefer interfaces over types for object-like specs 2020-10-08 12:19:01 -07:00
evanboyle
9f4461db37 Node Automation API tsdoc 2020-10-08 12:19:01 -07:00
evanboyle
84136e2271 mark exports as internal where appropriate 2020-10-08 12:19:01 -07:00
evanboyle
99574ff555 node automation api structured error design 2020-10-08 12:19:01 -07:00
evanboyle
631e6cbaf1 improve typing for UpdateSummary timestamps, WhoAmI results 2020-10-08 12:19:01 -07:00
evanboyle
2d49cabf68 simplify project and stack settings impl 2020-10-08 12:19:01 -07:00
evanboyle
cf194bff4b remove parallelism from node automation api operations 2020-10-08 12:19:01 -07:00
evanboyle
848086fa26 remove stack property getters 2020-10-08 12:19:01 -07:00
evanboyle
e77fc0a961 only expose static create methods (and overloads) for Stack and LocalWorkspace 2020-10-08 12:19:01 -07:00
evanboyle
6f622bc9e1 fix test mode, test mode tests 2020-10-08 12:19:01 -07:00
evanboyle
66a71f2bab cleanup automation api host runtime settings post-run, fix tests 2020-10-08 12:19:01 -07:00
evanboyle
7d171917ea support inline programs for nodejs automation api 2020-10-08 12:19:01 -07:00
evanboyle
b902472a03 add static LocalWorkspace methods for New/Select/Upsert Stack w/ local and inline programs 2020-10-08 12:19:01 -07:00
evanboyle
5380223c28 bump test timeout 2020-10-08 12:19:01 -07:00
evanboyle
234f6a1707 up/preview/refresh/destroy 2020-10-08 12:19:01 -07:00
evanboyle
435018676e Stack status methods 2020-10-08 12:19:01 -07:00
evanboyle
87e5b6f5eb Stack.runPulumiCmd 2020-10-08 12:19:01 -07:00
evanboyle
6a29404db2 LocalWorkspace list stacks and current stack 2020-10-08 12:19:01 -07:00
evanboyle
0420d38354 LocalWorkspace and Stack config 2020-10-08 12:19:01 -07:00
evanboyle
d7ea6a089b Stack Create/Select/Upsert 2020-10-08 12:19:01 -07:00
evanboyle
0062292e3b complete LocalWorkspace stub 2020-10-08 12:19:01 -07:00
evanboyle
5c220c192a LocalWorkspace create/select/remove stack 2020-10-08 12:19:01 -07:00
evanboyle
112720702a LocalWorkspace.stackSettings() tests 2020-10-08 12:19:01 -07:00
evanboyle
946c12c891 continue LocalWorkspace impl, add runPulumiCmd 2020-10-08 12:19:01 -07:00
evanboyle
06b89e6151 LocalWorkspace.StackSettings() 2020-10-08 12:19:01 -07:00
evanboyle
2ace0b0234 StackSettings 2020-10-08 12:19:01 -07:00
evanboyle
faafb6b157 LocalWorkspace.saveProjectSettings() 2020-10-08 12:19:01 -07:00
evanboyle
fa388380c4 LocalWorkspace.projectSettings() 2020-10-08 12:19:01 -07:00
evanboyle
ebdd3c1053 project settings 2020-10-08 12:19:01 -07:00
evanboyle
36d10773cc Workspace interface 2020-10-08 12:19:01 -07:00
Justin Van Patten
9bcf02e7ed
Support remote components in Python (#5375) 2020-09-30 14:09:20 -07:00
Lee Briggs
95bc138b41
add master branch workflow (#5386) 2020-09-21 16:20:05 -07:00
Justin Van Patten
11752af5d7
Fix typo in Node.js dynamic provider GRPC service (#5365) 2020-09-15 05:45:06 -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
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
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
Justin Van Patten
3601d710cc
Work around TS compiler error (#5148) 2020-08-11 06:35:12 -07:00
Trung Lê
4362744a7d
Fix typo (#5153) 2020-08-11 12:12:24 +01:00
Levi Blackstone
736019f7ce
Add support for streamInvoke during update (#4990)
Previously, streamInvoke was only supported by
the query command. Copied the implementation
into the resource monitor, which will allow
streaming invoke commands to run during updates.

Also fixed a bug with cancellation of streaming
invokes. The check was comparing against a
hardcoded string, which did not match the actual
error string. Instead, we can rely on the error code.
2020-07-10 10:56:35 -06:00
stack72
9e33449245 Ensuring references to v2 pulumi packages are up to date 2020-06-17 14:54:05 +03:00