Commit graph

163 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
Praneet Loke 0343a6de76
[codegen/docs] Use go:embed for templates and use DisplayName from schema for titles (#8389)
* Use the display name from the schema, if available

* Update comment on the titleLookup map

* Add examples of reserved labels that can be used with the Keywords array in the schema
2021-11-10 11:07:43 -08:00
Paul Stack 52ba8b446c
Cleanup of all docker operations since moving to pulumi/pulumi-docker-containers (#8252)
Co-authored-by: Josh Kodroff <josh@pulumi.com>
2021-10-26 20:37:33 +03:00
Fraser Waters b56d902afe
Add that pulumictl is needed to make pulumi (#8196) 2021-10-12 09:51:12 -07:00
Ian Wahbe 4022108287
Merge branch 'master' into iwahbe/make-lint-status-code 2021-08-28 00:39:50 -04:00
Pat Gavlin 98f73cf1ed
Start in on developer documentation. (#7839)
Developer documentation is written in Markdown and can be built into
HTML, PDF, etc. using Sphinx. Diagrams are written in PlantUML and
rendered as SVGs. All developer docs live in the `developer-docs` folder
under the root of the repository.
2021-08-25 15:18:13 -07:00
Ian Wahbe 0cec2a6268 "make lint" returns an accurate status code 2021-08-25 14:43:50 -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
Anton Tayanovskyy ba70b3fdba
Attempt to avoid triple-building projects in the solution (#7638) 2021-07-28 20:31:11 -04:00
Anton Tayanovskyy 3aa97a4b7d
Fanout build experiment (#7628)
* Experiment with gotestsum and test timings

* Fix to locating the helper script

* Fix the code for installing gotestsum

* Try alternative installation method

* Use go to compute test stats; Python fails parsing time values

* Try version without v

* Try with fixed gorelaser config

* Fix test time correlation

* Try a stable test stat sort finally

* Use more accurate test duration aggregation

* Include python and auto-api tests in the Go timing counts

* Bring back TESTPARALLELISM

* Fix test compilation

* Only top 100 slow tests

* Try to fracture build matrix to fan out tests

* Do not run Publish Test Results on unsuppored Mac

* Auto-create test-results-dir

* Fix new flaky test by polling for logs

* Try to move native tests to their own config

* Actually skip

* Do not fail on empty test-results folder

* Try again

* Try once more

* Integration test config is the crit path - make it smaller

* Squash underutilized test configurations

* Remove the test result summary box from PR - counts now incorrec

* Remove debugging step
2021-07-27 10:07:15 -04: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
Anton Tayanovskyy 6a84f7bfa6
Fix Makefile (#7485) 2021-07-12 10:42:06 -04:00
Pat Gavlin caaad35ae3
Re-enable tests. (#7462)
A number of tests have likely not been running since tags were added to
each test file. This is because `go list` uses build flags when scanning
files, so any pacakges that did not include at least one file that did
not have any tags (read: about half of the integration tests) were not
picked up by the command used in the Makefile to detect tests.
2021-07-08 12:13:02 -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
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
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
Komal fd3ec6b86f [automation/nodejs] - Fix missing OpTypes and PreviewOptions (#6507) 2021-04-14 19:32:17 +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 1d3c9edb6c
Ensure that make brew works as expected rather than passing empty version (#6566)
Fixes:#6565

As part of #6460, the logic for determing the version of the build was
moved to be a dependency on pulumictl.

Unfortunately, the homebrew installs use the "make dist" command to
build + install Pulumi to the user maching and as that would have a
dependency on pulumictl and it not existing on the user machine, it
would pass an empty version to the ldflag

This then manifested to the user as:

```
▶ pulumi version
warning: A new version of Pulumi is available. To upgrade from version '0.0.0' to '2.22.0', run
   $ brew upgrade pulumi
or visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.
```

We are able to mitigate this behaviour by bringing back the get-version
script and using that script as part of the make brew installation

We can see that the versions are the same between the 2 different
installation techniques

```
make dist <------- uses pulumict
DIST:
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=2.24.0-alpha.1616029310+787eb70a" github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet
DIST:
BUILD:
```

```
make brew <----- uses the legacy script
▶ make brew
BREW:
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=v2.24.0-alpha.1616029310+g787eb70a2" github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet
BREW:
```

A full post mortem will be carried out to ensure we mitigate these
types of errors going forward and that we are able to better test
these types of situations
2021-03-18 02:07:02 +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 fead88d4a6
Ensure that testing containers happens as part of a pulumi publish event (#6030) 2021-01-04 18:28:13 +00:00
Levi Blackstone 1d61784c1b
Add make target for debug builds (#6001) 2020-12-23 16:10:05 -07:00
Vivek Lakshmanan d12f59be46 Reduce verbosity on tests 2020-11-17 23:09:18 -08:00
Lee Briggs ca79cddb50
revert builds back to travis (#5486) 2020-09-30 15:46:52 -07:00
Lee Briggs 95bc138b41
add master branch workflow (#5386) 2020-09-21 16:20:05 -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
evanboyle ec98494e5a add auto tests to Makefile and fix up for CI 2020-08-23 21:36:21 -07:00
Paul Stack a53dfe69b7
Ensure docker-slim images only triggers on publish_packages (#4867) 2020-06-22 13:40:56 -06:00
Paul Stack 83406b97f8
Adding the langage SDK specific docker images (#4837)
* [WIP] Adding the langage SDK specific docker images

Fixes: #3789

* add multiple os build

This introduces multiple containers images with various different OS's.
The base build is based on debian (symlinked from the Dockerfile.debian)
build.

We also have UBi based images, and alpine based images

* Adding the langage SDK specific docker images

Fixes: #3789

* remove alpine builds

* test docker readme sync

* fix description

* fix name of sync task

Co-authored-by: Lee Briggs <lee@leebriggs.co.uk>
2020-06-18 01:35:45 +01:00
Chris Smith 5530836325
Disable container tests in cron, too (#4845)
I can test this during PRs, no need to keep it failing in cron jobs.
2020-06-17 10:26:56 -07:00
Pat Gavlin f50e2d8c1b Add a brew target.
This is necessary for the Homebrew build.
2020-05-13 20:27:15 -07:00
Chris Smith b31d5b6cea
Fix error in Makefile (#4573) 2020-05-05 14:00:02 -07:00
Pat Gavlin 9b1b9cca24
Makefile: properly encode dependencies (#4541)
This allows for the use of `make -j`, which speeds up a full build
dramatically at the cost of rather incomprehensible logs.
2020-05-04 14:26:52 -07:00
Chris Smith 7ed4e42c38
Enable container runtime tests for cron jobs (#4509)
* Enable container runtime tests for cron jobs

* Use VERSION var from Makefile

Co-authored-by: Paul Stack <public@paulstack.co.uk>

Co-authored-by: Paul Stack <public@paulstack.co.uk>
2020-04-30 12:52:05 -07:00
Praneet Loke 5430cfcf09
Fix make generate target for generating static bundle for docs templates (#4414) 2020-04-16 09:05:26 -07:00
Paul Stack f475b8b1bc
Removing an unused coverage target in the makefile (#4402)
Fixes: #4221
2020-04-15 17:48:16 +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
Pat Gavlin 2f22c1c59c
HCL2 updates (#4309)
Pulumi HCL2 IR:
- Add support for invokes
- Add support for resource options, incl. ranged resources
- Allow the apply rewriter to ignore promise-typed values
- Add tests for the binder
- Add support functions for TF: entries and range

NodeJS codegen:
- Simplify for expression codegen
- Add support for invoke codegen
- Add support for entries and range functions
- Add tests

Python codegen:
- Implement codegen for most expression types
- Add support for invoke codegen
- Add tests
2020-04-06 19:43:16 -07:00
stack72 1f8754b3e9 Change golint-ci to use timeout not deadline 2020-04-01 12:15:03 +01:00
stack72 a1af9289c3 Move BuildUtil class to sdk
This was still in pkg and wasn't accessible from the scripts location.
This code should be in the go/common location of sdk so that it can be
accessed from within our build scripts

Without this change, we were not able to get access to the Version number
for Python and none of our Python builds have been publishing binaries
2020-03-31 12:07:24 +01:00