Commit graph

1278 commits

Author SHA1 Message Date
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
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
Mike Metral dec6a6a49a refactor(autoapi-gitrepo): use Workspace in SetupFn callback 2020-09-02 19:15:40 -07:00
evanboyle d3cf745c59 First pass at Automation API README 2020-09-01 23:28:46 -07:00
Evan Boyle a0275ffbd1
check for nil resource and invoke options in go sdk (#5270) 2020-09-01 09:59:27 -07:00
Evan Boyle 741485d7d0
expose execution kind via update metadata (#5258) 2020-08-31 09:07:59 -07:00
evanboyle 5458e2f685 add expectnochanges to stack.refresh 2020-08-28 19:17:46 -07:00
Evan Boyle 09964d2031
Merge branch 'master' into evan/auto 2020-08-28 19:11:14 -07:00
evanboyle c23f26b335 docs and style updates 2020-08-28 19:10:39 -07:00
Justin Van Patten 69fbd70330
Python: Ignore internal properties when unmarshaling (#5251) 2020-08-28 18:26:16 -07:00
evanboyle b0d91478bf docs updates 2020-08-28 14:21:56 -07:00
Evan Boyle ed2e5c6680
Merge branch 'master' into evan/auto 2020-08-28 08:48:08 -07:00
Justin Van Patten 16d226d667
Avoid raising unexpected type errors with Any (#5238)
Avoid raising an `AssertionError` due to unexpected types when a type is annotated as `Any`.
2020-08-27 12:19:46 -07:00
evanboyle cf247c1245 update file headers 2020-08-27 10:43:23 -07:00
evanboyle ab03c53487 automation api godoc 2020-08-25 11:16:54 -07:00
evanboyle 463c7b6588 Merge branch 'master' of https://github.com/pulumi/pulumi into evan/auto 2020-08-24 17:51:40 -07:00
evanboyle 40701e6420 outputs should be map[string]interface{} 2020-08-24 06:51:49 -07:00
evanboyle ec98494e5a add auto tests to Makefile and fix up for CI 2020-08-23 21:36:21 -07:00
evanboyle 27db14791a auto error tests 2020-08-23 19:43:51 -07:00
evanboyle 47fb5a128d Add functional options for Up/Pre/Refresh/Destroy 2020-08-23 10:25:17 -07:00
evanboyle fa1590a67f propagate nested stack error 2020-08-22 12:01:55 -07:00
evanboyle 458fd59c24 Make Workspace and Stack commands contextful 2020-08-21 22:20:32 -07:00
evanboyle 4dacd506d3 propagate env vars and extensibility points from Workspace to Stack 2020-08-21 16:22:45 -07:00
evanboyle cc7cf7c476 Add Stack.Info 2020-08-21 15:26:58 -07:00
evanboyle 3531635294 Add NewStack helper methods and tests 2020-08-21 09:49:46 -07:00
evanboyle 7b58202938 Implement Stack based on Workspace interface 2020-08-20 19:37:39 -07:00
evanboyle 535d48ca72 Round out LocalWorkspace impl 2020-08-19 21:23:53 -07:00
evanboyle 93ff03a9d3 LocalWorkspace initial implementation 2020-08-19 11:13:42 -07:00
Justin Van Patten cd9fae599d
Python SDK changes to support input/output classes (#5033)
Python SDK changes to support strongly-typed input/output "dataclasses".
2020-08-19 01:15:56 -07:00
evanboyle 4a44b27b40 add automation api workspace interface 2020-08-18 11:07:03 -07:00
Lee Briggs 3a01c0cde8
Merge pull request #5150 from pulumi/jar-extract
support extracting jar files
2020-08-12 09:58:26 -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
Lee Briggs c325e4f53b
Merge branch 'justin/testresource' into jar-extract 2020-08-10 18:14:43 -07:00
Justin Van Patten 7a3ef12134 Work around TS compiler error 2020-08-10 14:57:09 -07:00
Lee Briggs 574a9151db
support jar files 2020-08-10 14:15:35 -07:00
Luke Hoban 5066ae3227
Fix support for CheckFailures in Python Dynamic Providers (#5139)
Fixes #5138.
2020-08-10 09:28:25 -07:00
Evan Boyle 996fd85e00
Add missing MapMap and ArrayArray types to Go SDK (#5092) 2020-08-03 11:37:28 -07:00
evanboyle 12d7216769 serve engine address via pulumi host command 2020-07-30 15:20:57 -07:00
evanboyle 9281e55e00 detect and throw errors for nested stacks 2020-07-29 19:01:51 -07:00
evanboyle 5d8aa34d09 run all commands in non-interactive mode 2020-07-29 11:22:46 -07:00
evanboyle 7e6a08dbe1 example update 2020-07-28 17:40:25 -07:00
evanboyle 34a86f54be godoc improvements 2020-07-28 17:32:38 -07:00
Justin Van Patten b364296521
Python: Improved error message when virtualenv doesn't exist (#5069) 2020-07-28 13:28:14 -07:00
evanboyle 8a707e27e3 godoc pt. 1 2020-07-27 22:26:39 -07:00
evanboyle 4f653683ce validate project name 2020-07-27 18:51:29 -07:00
evanboyle 114e3c2aff provide defaults for pului.yaml for inline source 2020-07-27 18:22:01 -07:00
Lee Briggs bad67d3242
switch os/user with luser
We make several calls to `os/user`, which uses CGO and means
cross-compilation is not possible. This replaces `os/user` with the
`luser` package, which is a drop-in replacement which does not use `CGO`
2020-07-27 14:44:08 -07:00
evanboyle 45ed471a7d handle and detect runtime errors for inline source 2020-07-26 13:43:33 -07:00
evanboyle 41d6767e32 host error handling, inline concurrent update detection 2020-07-26 12:52:59 -07:00
evanboyle 15b8f03dc3 enable e2e up/pre/ref/dest/rm test for inline source 2020-07-25 15:08:10 -07:00
evanboyle ae76944b77 use ts seeds for random test names 2020-07-25 13:28:57 -07:00
evanboyle b21f4e0f7b inline preview 2020-07-24 10:54:18 -07:00
evanboyle b0468d4166 init inline prototype 2020-07-24 01:31:54 -07:00
Justin Van Patten ce4badd488
Update pip/setuptools/wheel in virtual environment (#5042)
Update pip, setuptools, and wheel in the virtual environment before installing dependencies as recommended by the Python documentation. This should help avoid failures when only source distributions are available for a package and pip attempts to build a wheel locally.
2020-07-23 13:33:09 -07:00
evanboyle 0d3203c96d add ability to specify git URL instead of local source 2020-07-22 14:28:03 -07:00
evanboyle 6e7ce72db6 update error formatting 2020-07-21 18:44:53 -07:00
evanboyle e789ae9700 update test 2020-07-21 18:41:36 -07:00
evanboyle acc719e7c1 IsUnexpectedEngineError() 2020-07-21 18:39:35 -07:00
evanboyle be42f75d2c add some comments based on findings 2020-07-21 18:27:31 -07:00
evanboyle 0500aae0e0 IsRuntimeError() 2020-07-21 18:17:38 -07:00
evanboyle c360e4d3f1 Merge branch 'master' of https://github.com/pulumi/pulumi into evan/auto 2020-07-21 16:52:08 -07:00
evanboyle ff81dd8961 IsCompilationError 2020-07-21 16:21:47 -07:00
Sean Fausett a38bbaa221
Enable SourceLink with embedded PDB (#4967) 2020-07-21 16:55:08 +02:00
Mikhail Shilkov fe66a0ba6d
Speed up .NET programs with large number of resources (#5015)
* Speed up .NET programs with large number of resources
2020-07-21 10:50:14 +02:00
evanboyle f6bc545809 clean up test 2020-07-17 20:08:45 -07:00
evanboyle cf4e02d517 init error strategy 2020-07-17 20:04:37 -07:00
evanboyle 99d769b903 typo 2020-07-17 11:15:58 -07:00
evanboyle 5faf54cedd lint 2020-07-17 10:59:13 -07:00
evanboyle 5b9f1b60d4 tighten up the interface 2020-07-17 10:14:30 -07:00
Paul Stack 6d09fe32df
Add the ability to copy configs between stacks (#4971) 2020-07-17 11:14:10 +01:00
Pat Gavlin 418e2291a2
Protect against engine event mutation. (#5003)
Certain operations in `engine/diff` mutate engine events during display.
This mutation can occur concurrently with the serialization of the event
for persistence, which causes a panic in the CLI. These changes fix the
offending code and add code that copies each engine event before
persisteing it in order to guard against future issues.
2020-07-16 23:52:31 -07:00
evanboyle 96b9c74bda refresh, e2e test 2020-07-16 19:17:07 -07:00
evanboyle 7ac704125e pulumi stack rm 2020-07-16 18:50:34 -07:00
evanboyle 102dbad5ea destroy 2020-07-16 08:47:04 -07:00
evanboyle 30f0962529 preview 2020-07-16 00:34:13 -07:00
evanboyle c09a1cb351 capture last event from history for UpResult 2020-07-15 23:34:34 -07:00
evanboyle 13746f9c82 set config and secrets upon stack initialization 2020-07-14 23:35:26 -07:00
evanboyle ea6cd84dce add utils to round trip pulumi.yaml and pulumi.stack.yaml 2020-07-14 23:13:45 -07:00
Komal f364311064
Remove known_types decorators (#4980) 2020-07-13 12:27:00 -07: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
evanboyle ae465a19c9 expose GetUser GetOutputs 2020-07-10 00:55:07 -07:00
evanboyle e08e362a85 init/select stack, improvements 2020-07-09 22:30:52 -07:00
Komal bdc86e002a
Change how submodules are imported to work with Intellisense (#4948) 2020-07-08 18:34:59 -07:00
Pat Gavlin 2119601023
Implement PropertyPath.Add. (#4976)
This function adds a property value to another property at a given path,
creating containing properties as required. If the property cannot be
added because of a mismatch between the value types required by the path
and the values present in the destination, the add will fail. If a value
already exists at the given path, the add will succeed.

Related to #1635.
2020-07-07 14:45:36 -07:00
evanboyle 2504db3cd2 prototype 2020-07-07 14:25:11 -07:00
Paul Stack 57b91d553e
Adding the ability to specify a version as a ResourceOption (#4945) 2020-07-07 20:20:01 +01:00
Pat Gavlin a8a20ecb4b
[codegen/*] Add support for explicit secrets. (#4927)
- Add a new builtin function, secret, that marks its input value as
  secret
- Add support for this function to the various code generators

Fixes #4924.
2020-06-30 11:35:24 -07:00
Levi Blackstone 8961f5b0ca
Rename RetrieveTemplate function to RetrieveGitFolder (#4912)
The new name better reflects the functionality for external
consumers of this package.
2020-06-26 15:01:51 -06:00
Evan Boyle 2351fc66cf
Go SDK interfaces should declare impl of Ptr types where appropriate (#4911) 2020-06-26 11:25:53 -07:00
Komal ed752bc384
[codegen/python] Don't use __all__ (#4873) 2020-06-24 11:41:03 -07:00
Justin Van Patten 6bad3a3620
Exclude grpcio v1.30.0, which breaks Pulumi Python programs (#4883) 2020-06-24 08:11:05 -07:00
Pat Gavlin 3e6e28af36
Fix lint errors. (#4856)
These errors appear when using golangci-lint 1.27.0.
2020-06-18 14:17:11 -07:00
Paul Stack e20e6831a0
Merge pull request #4844 from pulumi/fix-package-refs
Ensuring references to v2 pulumi packages are up to date
2020-06-18 00:35:27 +01:00
Levi Blackstone 19a113de7a
Handle invalid UTF-8 characters before RPC calls (#4816)
Several users reported cases where error messages would
cause a panic if they contained accented characters. I wasn't
able to reproduce this failure locally, but tracked down the
panic to logging gRPC calls. The Message field is typed as
a string, which requires all of the characters to be valid UTF-8.

This change runs each log string through the strings.ToValidUTF8
function, which will replace any invalid characters with the
"unknown" character. This should prevent the the logger from
panicking.
2020-06-17 13:30:59 -06:00
stack72 9e33449245 Ensuring references to v2 pulumi packages are up to date 2020-06-17 14:54:05 +03:00
Praneet Loke 2513709089
Use the GH webhook payload to parse PR details when CI system is GH Actions (#4817)
* Read the file and parse it. Also use the PR Head SHA instead of the GITHUB_REF if the build type is pull_request.

* Update changelog
2020-06-15 12:49:09 -07:00
Evan Boyle fa69a31c97
Set default namespace for go config for config-less get/try/require (#4802) 2020-06-12 16:35:06 -07:00
Justin Van Patten 9b0169be35
Fix pylint(no-member) when accessing resource.id (#4813)
Pylint currently reports `E1101: Instance of 'Bucket' has no 'id' member (no-member)` on lines in Pulumi Python programs like:

```python
pulumi.export('bucket_name', bucket.id)
```

Here's a description of this message from http://pylint-messages.wikidot.com/messages:e1101:

> Used when an object (variable, function, …) is accessed for a non-existent member.
>
> False positives: This message may report object members that are created dynamically, but exist at the time they are accessed.

This appears to be a false positive case: `id` isn't set in the constructor (it's set later in `register_resource`) and Pylint isn't able to figure this out statically. `urn` has the same problem. (Oddly, Pylint doesn't complain when accessing other resource output properties).

This change refactors `register_resource` so that `id` and `urn` can be assigned in the resource's constructor, so that Pylint can see it being assigned. The change also does the same with `read_resource`.
2020-06-12 12:41:56 -07:00
Evan Boyle 3d2df8992f
Use appropriate types for go config methods (#4800) 2020-06-10 18:24:05 -07:00
Justin Van Patten b77ec919d4
Install and use dependencies automatically for new Python projects (#4775)
Automatically create a virtual environment and install dependencies in it with `pulumi new` and `pulumi policy new` for Python templates.

This will save a new `virtualenv` runtime option in `Pulumi.yaml` (`PulumiPolicy.yaml` for policy packs):

```yaml
runtime:
  name: python
  options:
    virtualenv: venv
```

`virtualenv` is the path to a virtual environment that Pulumi will use when running `python` commands.

Existing projects are unaffected and can opt-in to using this by setting `virtualenv`, otherwise, they'll continue to work as-is.
2020-06-09 16:42:53 -07:00
Praneet Loke 407896730c
Add GitHub Actions detection and update the Pulumi CI escape hatch with more CI vars (#4758)
* Add GitHub Actions detection. Update the Pulumi CI escape hatch with more CI vars.
2020-06-08 17:24:12 -07:00
Luke Hoban 678a5a6d3e
Export the CustomTimeouts class (#4747)
This class was available in the pulumi.resource module, but was not exported from the core `pulumi` module as intended for all public APIs at this level.
2020-06-03 15:36:44 -07:00
Lee Zen 0dac22c360
Escape the path to ensure we fetch plugins correctly (#4733) 2020-05-29 14:59:25 -07:00
Paul Stack 45e1917a30
Upgrade to Go 1.14.x (#4697) 2020-05-28 12:01:33 +01:00
Tomas Jansson 1bdfd3dd41
Add F# operators for InputUnion (#4699) 2020-05-26 14:18:56 +02:00
Chris Smith f613b6917b
Download plugins from get.pulumi.com (#4692)
* Remove long-since deprecated --cloud-url flag

* Download plugins from get.pulumi.com

* Update CHANGELOG.md

* Use more straight forward TrimSuffix
2020-05-25 09:16:57 -07:00
Justin Van Patten 6b0a845cc1
Support publishing Python policy packs (#4644)
Adds support for publishing Python policy packs to the service, and downloading/using such policy packs when applied to stacks in an organization.
2020-05-22 15:01:15 -07:00
Justin Van Patten af3d4b890d
Allow pulumi.export calls from unit tests (#4670)
The previous attempt to allow this didn't actually allow it, so this is
take two. As part of the previous attempt, I thought after tweaking the
test I had observed the test failing, and then succeeding after making
the product changes, but I must have been mistaken.

It turns out that our existing mocks tests weren't running at all
because of a missing `__init__.py` file. Once the missing `__init__.py`
is added, the tests run, but other tests ("test mode" tests) fail
because the code that creates the mocks and resources will run during
test discovery, and setting the mocks modifies global state.

To address the test issue, I've moved the mocks tests into their own
`test_with_mocks` package that can be run separately from other tests.

And addressed the original issue, by creating a root Stack resource if
one isn't already present when the mocks are set.
2020-05-20 09:54:40 -07:00
Evan Boyle 20452b9cb5
fix dotnet error (#4668) 2020-05-19 12:06:24 -07:00
Mikhail Shilkov 5b0c4e162d
Fix NRE in C# mocks and include the stack to result again (#4656)
Fix NRE in C# mocks and include the stack to result again
2020-05-18 17:18:12 +02:00
Pat Gavlin e677c7d6dc
[sdk/go] Add support for untagged outputs. (#4640)
With these changes, a resource struct may tag a field with the empty
string. If such a field is present, any resource outputs that were not
unmarshalled into other fields will be unmarshalled into this field,
which must be a `MapOutput`.

Fixes #4629.
2020-05-14 14:43:20 -06:00
Lee Briggs 8c314ec39a
Add brew make targets to sdk makefiles 2020-05-13 20:42:01 -07:00
Paul Stack 48f906e026
Allow pulumi stack export to decrypt secrets (#4046) 2020-05-11 19:16:30 +01:00
Luiz Ferraz 2bfef6f4d7
Allows conditional dependencies and Resources from apply (#4446) 2020-05-08 17:57:08 -07:00
solidDoWant b7fb3bae22
Fixed ResourceOption deepcopy bug in stack_reference.py (#4553) 2020-05-08 12:01:59 -07:00
Levi Blackstone b445206101
Add ResourceOutput type to Go SDK (#4575) 2020-05-05 21:13:58 -06:00
Justin Van Patten 1fe5b1cb26
Fix occasional .NET test failure (#4564)
This avoids the "NotSupportedException : Multiple executions of TestAsync must run serially" from calls to `Deployment.TestAsync` in the mocks test, which can happen if a stack test runs before the mock test (.NET unit tests are run in random order).
2020-05-05 15:09:50 -07:00
Justin Van Patten c501709317
Avoid TS compiler error (#4572) 2020-05-05 14:22:29 -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
Justin Van Patten c058443107
.NET: Disable parallel xUnit tests (#4547)
Despite having the `[assembly: CollectionBehavior(DisableTestParallelization = true)]` attribute, it appears `dotnet test` is still running tests in parallel. To address, use a configuration file to disable parallelization.
2020-05-01 11:42:32 -07:00
Yves Reynhout f36a8b4ca0
Adds TPL based runTask to Deployment (#3858)
Add TPL based runTask to Deployment.
2020-05-01 16:21:37 +02:00
Luke Hoban edf8bf5c30
Support map-typed inputs in Go SDK RegisterResource (#4521)
Adds support for RegisterResource to accept map-typed implementations if Input as well as the existing struct-typed implementations. Currently these must be fully untyped - but both map[string]pulumi.Input and map[string]interface{} are allowed. In the future, it's plausible that a mode where the data itself is a map, but the ElementType implementation returns a struct could be supported, with the struct used to provide type information over the untyped map.
2020-04-30 11:56:47 -07:00
Justin Van Patten 653dcf8f1f
Don't call IMocks.NewResourceAsync for the root stack resource (#4527) 2020-04-30 10:38:48 -07:00
Paul Stack f06e48b414
Enable fish completions for pulumi cli (#4401) 2020-04-30 15:45:57 +01:00
Justin Van Patten 16926504c1
Allow pulumi.export calls from unit tests (#4518)
This change allows importing modules with calls to `pulumi.export` in unit tests. Previously, you'd have to structure the Python program in a way that avoids the `pulumi.export` from being called from unit tests.
2020-04-29 10:03:20 -07:00
Levi Blackstone d1ba572e1d
Fix infinite recursion bug for Go SDK (#4516)
gatherDependencySet was not checking for Resources
in the dependency set, which could lead to infinite
recursion.
2020-04-28 18:10:07 -06:00
komal b555286042 Updating .NET references 2020-04-27 12:42:11 -07:00
Komal c7866108e1
Merge branch 'master' into komalali/increase-grpc-message-size 2020-04-24 17:54:32 -07:00
Luke Hoban cfa57914a1
[sdk/python] Improve ResourceOptions.merge type (#4484)
* [sdk/python] Improve `ResoruceOptions.merge` type

The implementation correctly handles `None` inputs, so the type should allow these as well.

* Add CHANGELOG
2020-04-24 17:45:11 -07:00
Komal 6f49d990f7
Remove preview language from dotnet readme. 2020-04-24 13:54:41 -07:00
komal 2776a80a14 remove unneeded types 2020-04-23 17:58:17 -07:00
komal 6a869fa0f3 fix c# channel option 2020-04-23 17:30:23 -07:00
komal 28d69e963e add tests for node and python 2020-04-23 11:16:36 -07:00
Komal Ali 066e27766c add explanation of constant 2020-04-23 11:16:36 -07:00
Komal Ali 9cf635ad5a pr changes 2020-04-23 11:16:36 -07:00
Komal Ali de41fecfdc fix python server options 2020-04-23 11:16:36 -07:00
Komal Ali cc96df7485 update channel options in go 2020-04-23 11:16:36 -07:00
Komal Ali 64f3c4a02a update sdks with new max message size 2020-04-23 11:16:36 -07:00
Justin Van Patten 7f27618e2d
Avoid replace on second update with import applied (#4403)
After importing some resources, and running a second update with the
import still applied, an unexpected replace would occur. This wouldn't
happen for the vast majority of resources, but for some it would.

It turns out that the resources that trigger this are ones that use a
different format of identifier for the import input than they do for the
ID property.

Before this change, we would trigger an import-replacement when an
existing resource's ID property didn't match the import property, which
would be the case for the small set of resources where the input
identifier is different than the ID property.

To avoid this, we now store the `importID` in the statefile, and
compare that to the import property instead of comparing the ID.
2020-04-15 18:52:40 -07:00
Mikhail Shilkov 3e7b3667ee
Bump to .NET Core 3.1 (#4400)
Bump to .NET Core 3.1
2020-04-15 16:31:18 +02:00
Justin Van Patten 33119659e0
Treat config values that start with '0' as strings (#4393)
When setting structured config values using `--path`, we automatically
treat values that can be converted into an integer via `strconv.Atoi` as
an integer, rather than as a string.

However, this ends up converting values like "0123456" into the integer
123456, stripping the leading 0, which isn't desirable for values like
commit SHAs, etc., where you want to keep the 0 (and keep it a string).

This change makes it so that values starting with 0 are not implicitly
converted to an integer; instead such values will remain a string.
2020-04-14 12:40:22 -07:00
stack72 b721aefe27 Adding an empty PublicAPI.Unshipped.txt file 2020-04-14 11:17:39 +01:00
stack72 0af34619bb Mark .NET API as shipped 2020-04-14 10:59:44 +01:00
stack72 d1c76808af Small linting error after merging feature 2.0 branch 2020-04-14 09:55:18 +01:00
stack72 74df34be75 Re-enabling dockerfile latest, docs and homebrew publishing
These had previously been disabled due to the beta releases. Also
fixes an import path for finding an executable
2020-04-14 09:40:11 +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 4261b27a5e
fix propagation of secrets for resource inputs/outputs in go sdk (#4387) 2020-04-13 22:48:36 -07:00
Evan Boyle 9d2f40b686
fix unknown status for secrets wrapping unknowns (#4377)
* fix unknown status for secrets wrapping unknowns

* changelog

* add test for secret computed values
2020-04-13 22:47:08 +01:00
Evan Boyle 4bbddafe6c
update remote path for policy pack template tests (#4381) 2020-04-13 14:02:17 -07:00
Mikhail Shilkov d3e7041c0d
Support the binary option for .NET (#4355)
Support the binary option for .NET
2020-04-12 21:34:50 +02:00
Evan Boyle fe7877177c
fix stack reference helpers to handle nil values (#4370) 2020-04-12 08:44:08 -07:00
Evan Boyle 779c4144f9
Properly propagate unknowns in go SDK marshaling operations (#4369) 2020-04-11 22:20:03 -07:00
Evan Boyle c3b2439094
Automate execution of go mod download for pulumi new Go templates (#4353) 2020-04-09 16:16:10 -07:00
Justin Van Patten 8c065b34ff
Remove unnecessary import (#4350) 2020-04-09 14:13:16 -07:00
Evan Boyle cfea357cda
Add runtime.options.binary to Pulumi.yaml to make prebuilt go binaries opt-in (#4338) 2020-04-09 12:21:26 -07:00
Evan Boyle 7382de6b5f
Add Go SDK stack output helpers for String and ID (#4341) 2020-04-09 07:52:34 -07:00
Mikhail Shilkov 46dababc28
Add additional RunAsync overloads (#4286) 2020-04-09 16:43:43 +02:00
Evan Boyle f50fd69c10
Define merge behavior for go resource options (#4316) 2020-04-07 14:19:33 -07:00
Mikhail Shilkov 1d171dbb74
Add Output.All overloads (#4321)
Add Output.All overloads
2020-04-07 20:51:05 +02: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
Levi Blackstone d363be9de0
Propagate additionalSecretOutputs opt to Read in NodeJS (#4307) 2020-04-06 15:50:52 -06:00
Evan Boyle ab659aa0c1
Reimplement getRequiredPlugins for go sdk (#4297) 2020-04-06 12:30:40 -07:00
Mikhail Shilkov 6d32d575e0
Enable features in mock monitor (#4272) 2020-04-03 08:33:40 +02:00
Mikhail Shilkov 0bce094dc1
Fix python mock's call (#4274)
Fix python mock's call
2020-04-03 07:28:52 +02:00
Justin Van Patten dd104a00a7
Propagate secretness correctly in Python apply (#4273)
* Propagate secretness correctly in Python `apply`

* Improve `apply` test coverage

* Update CHANGELOG.md
2020-04-02 13:01:29 -07:00
Luke Hoban 9e37741916
[Go] Ensure Apply handles nil output values (#4268)
Fixes #4247.
2020-04-01 17:39:01 -07:00
Luke Hoban a0f615ad09
Add package details and atttribution to schema (#4256) 2020-04-01 17:22:23 -07:00
Evan Boyle 8a8f424628
disable go plugin acquisition (#4257) 2020-03-31 23:00:35 -07:00
Luke Hoban dd9ed3c938
Support grpc-js plugin servers (#4253)
In order to support grpc-js gRPC servers, we need to slightly loosen
our checks on plugin readiness.  This change was already in the 2.x
branch, but porting back so that 1.x CLIs can also be compatible.

Fixes #4252.
2020-03-31 14:18:09 -07:00
Justin Van Patten a5ca20bbf2
Specify StringComparison.Ordinal to StartsWith (#4244)
StartsWith does a culture-sensitive comparison by default, and in this case, we really just want an ordinal comparison.
2020-03-31 08:24:58 -07: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
Luke Hoban 8826fe4857
Fix Node.js SxS checks for 1.x and 1.y (#4235)
Fixes #4234
2020-03-30 15:10:42 -07:00
Justin Van Patten e6be38e285
PaC: Add initial config support for policy packs (#4233)
The initial config represents any config that was specified programmatically to the Policy Pack, for Policy Packs that support programmatic configuration like AWSGuard.
2020-03-30 12:52:05 -07:00
stack72 947e52b194 Merge branch 'master' into tasiah/4204/go-logging-bug 2020-03-27 18:29:23 +00:00
Tasia Halim 4afaf37b3a fixed bug 2020-03-27 10:25:06 -07:00
Mikhail Shilkov 6e15c83e1a
Remove legacy .NET attributes (#4190)
Remove legacy .NET attributes
2020-03-27 10:51:42 +01:00
Matthieu Berthomé 7c75d4fe5b
ephemeral kwargs for log methods (#4197)
Co-authored-by: rienafairefr <rienafairefr@gmail.com>
2020-03-26 14:23:43 -07:00
Evan Boyle 80f1989600
Removing the need for vendoring (#4167) 2020-03-25 15:57:46 -07:00
Luke Hoban 215f5af505
Clarify documentation on Output.from_input (#4178) 2020-03-25 15:28:22 -07:00
Luke Hoban 738c6eac5b
Allow pulumi/pulumi 1.x and 2.x to be used SxS (#4161)
Fixes #4079.
2020-03-24 21:59:25 -07:00
Evan Boyle 2408d34c71
Add missing builtin MapArray to the Go SDK (#4144) 2020-03-20 16:51:33 -07:00
Evan Boyle c28c602247
capture std err when getting required plugins for go (#4141)
* capture std err when getting required plugins for go
2020-03-20 14:59:12 -07:00
evanboyle 5e1f597ea9 make distinction between python VERSION and PYPIVERSION for install vs release 2020-03-19 17:02:10 -07:00
evanboyle 163444bce6 disable logging test 2020-03-19 14:45:03 -07:00
evanboyle fa47d867fd fix go sdk makefile to run tests 2020-03-19 14:10:48 -07:00
evanboyle a2b368827f fix internal logging usage 2020-03-19 11:45:10 -07:00
evanboyle 31d8f79f35 fix klog initialization 2020-03-19 10:01:10 -07:00
evanboyle 4e44854308 replace glog with klog 2020-03-19 08:56:44 -07:00
evanboyle ec686bbaf6 Merge branch 'master' of https://github.com/pulumi/pulumi into evan/gomod 2020-03-18 17:57:58 -07:00
evanboyle 29dfd65632 fix resource test data path 2020-03-18 17:36:28 -07:00
evanboyle bc4e5bf31c run common tests as a part of go sdk make 2020-03-18 17:32:27 -07:00
evanboyle d3f5bbce48 go fmt 2020-03-18 17:27:02 -07:00