Commit graph

79 commits

Author SHA1 Message Date
Justin Van Patten ba39ed9ad4
Add tests that return failures from Call (#8424)
- [sdk/nodejs] - Allow returning failures from Call in the provider without setting result outputs.
- [sdk/go] - Allow specifying Call failures from the provider.
- Add tests that return failures from Call.
2021-11-16 08:58:46 -08:00
Justin Van Patten f6cc3d375c
Add output values integration tests (#8421) 2021-11-15 15:42:04 -08:00
Justin Van Patten c4c1f3d449
Add tests that create resources from methods (#7701) 2021-11-15 11:17:53 -08:00
Anton Tayanovskyy 6766e53574
Pin Python versions for tests running on GHA Windows workers (#8225)
* Pin Python versions for tests running on GHA Windows workers

* Fix interpolation syntax
2021-10-14 15:08:49 -07:00
Justin Van Patten 74ab9e0869
[sdk/python] Handle unknown results from methods (#7677)
This fixes handling of unknown results from methods in the Python SDK. Node.js and Go were already handling this appropriately.
2021-07-29 11:11:52 -07:00
Justin Van Patten e8bd8e5e1f
Rehydrate provider resources in Construct (#7624)
Previously, any provider resource passed to multi-lang components would be instantiated as a `DependencyProviderResource` inside `Construct`, which prevents the component from being able to easily access the provider's state as an instance of of the provider (e.g. `*aws.Provider`).

This change attempts to rehydrate the provider resource in the same way that resource references are rehydrated, if it's been registered, s.t. the specific provider resource type is instantiated with its state. Otherwise falling back to returning `DependencyProviderResource`.
2021-07-23 14:10:06 -07:00
Justin Van Patten 8c4a56acb7
[sdk/dotnet] Clean obj & bin dirs when building (#7562) 2021-07-19 11:22:08 -07:00
Justin Van Patten 824fb397f9
[sdk/go] Support for implementing methods in provider (#7379) 2021-07-01 15:46:16 -07:00
Justin Van Patten 84b574f0df
Initial support for resource methods (authoring from Node.js, calling from Python) (#7363)
Adds initial support for resource methods (via a new `Call` gRPC method similar to `Invoke`), with support for authoring methods from Node.js, and calling methods from Python.
2021-06-30 07:48:56 -07:00
Evan Boyle c37cbc998b
Fix a hang in nodejs remote components when an error is thrown within an apply (#7365) 2021-06-25 18:41:54 -07:00
Justin Van Patten 48bbc28d9e
[sdk/go] Specify known when creating outputs for construct (#7343)
If an input is an unknown value or contains unknowns, specify `false` for `known` when creating the output.
2021-06-21 09:51:41 -07:00
Justin Van Patten f973fbcf58
[sdk/nodejs|python] Add GetSchema support to providers (#6892) 2021-05-19 07:11:18 -07:00
Paul Stack f68b583831
Using goreleaser as the publishing mechanism for Windows binaries (#6975) 2021-05-10 11:11:08 +01:00
Justin Van Patten 81810cbb9c
[sdk/go] Support prompt values in Construct (#6790)
Adds support for prompt values. And renames `ConstructInputs.SetArgs` to `ConstructInputs.CopyTo`.
2021-04-18 09:18:25 -07:00
Justin Van Patten 780a0c8a3d
Support defining remote components in Go (#6403) 2021-04-16 11:49:21 -07:00
Anton Tayanovskyy b77f32930c
Remote component py SDK (#6715)
* Python support for authoring resource providers for multi-lang

* Support for passing prompt values to Python resource providers
2021-04-15 14:49:51 -04:00
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
Justin Van Patten f7cc19f89d
[sdk/nodejs] Keep prompt values prompt in construct (#6522)
In order to support prompt values in multi-lang components, if an input value is prompt, keep it as-is instead of wrapping it in an Output.
2021-04-09 14:36:22 -07:00
Justin Van Patten 394f79f27f
[sdk/nodejs] Fix construct to wait for RPC operations to complete (#6452)
This change fixes the provider implementation of `Construct` for multi-lang components written in Node.js to wait for any in-flight RPCs to finish before returning the results, s.t. all registered child resources are created.

In additional, invocations of `construct` are now serialized so that each call runs one after another, avoiding concurrent runs, since `construct` modifies global state. We'll follow-up with a more general concurrency fix to allow nested `construct` calls within the same provider.
2021-04-05 11:11:27 -07:00
Paul Stack 8369bf22e4
Ensure we pass a v prefix to the version string on Windows (#6598) 2021-03-22 20:19:06 +00:00
pulumi-bot b8110ae04f [build] ensure v is passed as a prefix to go install on windows 2021-03-18 03:31:19 +00:00
pulumi-bot 64870480cc [build] ensure v is passed as a prefix to go install on windows 2021-03-18 02:57:33 +00:00
Paul Stack 3f2d58ef7b
Fixing up go.mod and go.sum to ensure they don't continually change (#6502) 2021-03-11 20:41:45 +00:00
Paul Stack c48ba37fcf
Migrate the version calculation to use pulumictl (#6460) 2021-03-10 19:03:29 +00:00
Paul Stack 20e84dfe9e
Upgrading Go to 1.16.x (#6470) 2021-03-09 20:05:23 +00:00
Komal 4a59900920
Enable python automation API tests on Windows (#6424) 2021-02-24 17:28:23 -08:00
Justin Van Patten 066507cd00
Do not specify a specific version of Python on Windows (#6316)
We install the version of Python we need in the CI environment (e.g. 3.9.x).
2021-02-11 08:22:04 -08:00
Paul Stack a045a613f2
Revert "Split the windows build + testing to be separate jobs to allow for future language matrix tests" (#6274)
This reverts commit 2e695196ae.
2021-02-08 17:02:20 +00:00
Paul Stack 220f138120
Revert "Ensuring all of the windows cmd binaries are included in the master builds" (#6275)
This reverts commit 3ee48c64ed.
2021-02-08 17:01:59 +00:00
Paul Stack 3ee48c64ed
Ensuring all of the windows cmd binaries are included in the master builds (#6273) 2021-02-08 17:01:30 +00:00
Paul Stack 2e695196ae
Split the windows build + testing to be separate jobs to allow for future language matrix tests (#6193) 2021-02-08 11:17:47 +00:00
Komal b8e31446d1
[build/windows] - Fix verbose test logging and increase timeout (#6023) 2020-12-29 15:51:10 -08:00
Paul Stack b2d06daae1
Trying to solve Python build on windows (#5649) 2020-10-30 12:13:59 +00: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
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
stack72 4844443988 Ensure that the version is actually passed to the Windows binary 2020-04-14 11:23:25 +01:00
CyrusNajmabadi 66bd3f4aa8
Breaking changes due to Feature 2.0 work
* Make `async:true` the default for `invoke` calls (#3750)

* Switch away from native grpc impl. (#3728)

* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)

* Only retry as long as we get unavailable back.  Anything else continues. (#3769)

* Handle all errors for now. (#3781)


* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)

* Upgrade all paths for sdk and pkg to v2

* Backport C# invoke classes and other recent gen changes (#4288)

Adjust C# generation

* Replace IDeployment with a sealed class (#4318)

Replace IDeployment with a sealed class

* .NET: default to args subtype rather than Args.Empty (#4320)

* Adding system namespace for Dotnet code gen

This is required for using Obsolute attributes for deprecations

```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```

* Fix the nullability of config type properties in C# codegen (#4379)
2020-04-14 09:30:25 +01:00
Evan Boyle 3eb3a0dec4
Move examples tests to /test/examples (#4196) 2020-03-26 20:19:18 -07:00
stack72 8b4de4d476 Fixup Windows publish script for GHA 2020-03-26 20:29:15 +00:00
Evan Boyle 80f1989600
Removing the need for vendoring (#4167) 2020-03-25 15:57:46 -07:00
Chris Smith 8efd992bab
Fix 'pulumi stack ls' on Windows (#4094)
* Fix 'pulumi stack ls' on Windows

* Update CHANGELOG.md
2020-03-18 13:57:25 -07:00
stack72 f11b7129a0 Run Dep Ensure when testing Go integration projects
Fixes: #3939
2020-03-10 03:11:44 +02:00
stack72 985084651c Trying to build the windows build on GHA rather than AppVeyor 2020-02-27 17:11:39 +02:00
Paul Stack 548996d7ae
Restore the work to add Publish release builds of Pulumi (#3875)
Fixes: #3874

As part of #3656, the build.proj was changed around to support
building and running our tests on windows. The work in that PR added
a lot to get Python, Go and DotNet included in our master and PR runs
for those tests

This PR restores the work to allow the original work for non-PRs (i.e.
tagged builds) to work along side this. It adds a `Release` target which
targets the same build targets as before. It is wrapped in a condition that
will mean it can run when AppVeyor is dealing with a tag (i.e a release)

This means that the existing work to allow all of the master and pr builds
to continue running all of our integration tests will still work as
expected
2020-02-06 09:28:08 -08:00
stack72 81d271d9ed Changing build.proj to run all languages and tests on windows 2020-01-27 21:16:37 +02:00
James Nugent edab10e9c8 Use Go Modules for dependency tracking
This commit switches from dep to Go 1.12 modules for tracking Pulumi
dependencies. Rather than _building_ using Go modules, we instead use the `go
mod vendor` command to populate a vendor tree in the same way as `dep ensure`
was previously doing.

In order to prevent checksum mismatches, it was necessary to also update CI to
use Go 1.12 instead of 1.11 - which also necessitated fixing some linting errors
which appeared with the upgraded golangci-lint for 1.12.
2019-04-10 08:37:51 +04:00
Matt Ellis 6c7092ff65 Pass -count=1 to disable result caching on go 1.10 and above 2018-11-08 14:11:52 -08:00
Matt Ellis 45faf10eed Bump windows test timeout
Some of the AppVeyor integration tests are timing out (from time to
time) and I think the deadline of 2 mins is a tad too short. We've
actually done similar bumps for macOS in Travis which was also a
little slow.
2018-06-25 17:31:31 -07:00
Matt Ellis dcb5ae1e1f Stop including native serialization modules
We retained these modules to support using v0.11.X and earlier
versions of @pulumi/pulumi, which required a native module to do
closure serialization. 0.12.X does not need this, so lets stop
including it.
2018-06-04 14:27:01 -07:00
Matt Ellis 409477b951 Invoke node directly from the language host
Instead of using a shell script to jump from the language host into
node, just invoke node directly. This makes our start-up path a little
simpler to understand and indirectly fixes pulumi/home#156, where we
would fail on Windows if the `-exec` script was in a folder that had
spaces in it (due to a subtle interaction between how go launches cmd
files and how cmd.exe parses arguments).
2018-05-02 11:16:58 -07:00