Commit graph

489 commits

Author SHA1 Message Date
Evan Boyle 91828b4310
[Go Program Gen] Improved handling for pulumi.Map types (#4914) 2020-06-29 15:29:41 -07:00
Evan Boyle 2351fc66cf
Go SDK interfaces should declare impl of Ptr types where appropriate (#4911) 2020-06-26 11:25:53 -07:00
stack72 ad721d3b54 Prepare for v2.5.0 release 2020-06-25 12:00:45 +03:00
Evan Boyle 31770c3300
go program gen: prompt array conversion, unused range vars, id handling (#4884) 2020-06-24 11:07:26 -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
Evan Boyle b302dbcbca
go program gen: lift expressions where prompt optionals are required (#4875) 2020-06-23 10:59:26 -07:00
evanboyle 9582d397ea changelog 2020-06-18 17:23:19 -07:00
Evan Boyle 8b8170252b
[Go Program Gen] multiline strings, get/lookup disambiguation, webserver example (#4850) 2020-06-18 13:34:22 -07: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
Evan Boyle 9cdddd2566
[Go Program Gen] Support for EKS example (#4831) 2020-06-17 17:19:39 -07: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
Evan Boyle 2d61852e4f
Go program gen: resource range, readDir, template strings, etc (#4818) 2020-06-15 23:00:02 -07: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
Paul Stack 1357be4afb
Ensure Authenticated to GCR when GOOGLE_CREDENTIALS supplied to action (#4812) 2020-06-12 19:38:50 +01:00
Justin Van Patten 78270ae3fc
Fix panic on pulumi up prompt when filtering and hitting arrow key (#4808)
When running `pulumi up`, after the preview, we prompt asking whether to proceed with the update. If you type to filter the options and then hit an arrow key a couple times, the CLI panics. This is a bug in the `survey` library we depend on. The issue has been fixed in the library upstream; this change updates our dependency.
2020-06-11 12:34:15 -07:00
Evan Boyle 3d2df8992f
Use appropriate types for go config methods (#4800) 2020-06-10 18:24:05 -07:00
stack72 e0bf69b77a Prepare for v2.4.0 release 2020-06-10 18:58:05 +01:00
Evan Boyle 45a901d3e7
Turn program gen NYIs into diagnostic errors (#4794) 2020-06-10 10:21:53 -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
Simen A. W. Olsen 76aede990e
[docker/actions] Base64 decode GOOGLE_CREDENTIALSAllows to use credentials that are Base64 encoded. (#4773) 2020-06-08 09:36:28 -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 Briggs bc05e2c955
improve dev version detection (#4732)
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-06-02 11:51:04 +01:00
stack72 aa5dfe4289 Prepare for v2.3.0 release 2020-05-27 20:30:22 +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
Lee Briggs 362fc8d7f2
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 08:07:09 -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
Lee Briggs 728d889bf8
Use patched azure gocloud library
Fixes #4642
2020-05-18 07:43:35 -07: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 d01a84eee8
Prepare for v2.2.1 release 2020-05-13 20:52:44 -07:00
Lee Briggs a5c08a74fe
Prepare for v2.2.0 release 2020-05-13 13:49:00 -07:00
Chris Smith 71910a1c52
Add PULUMI_SKIP_CONFIRMATIONS env var (#4477) 2020-05-13 14:01:02 +01:00
Paul Stack ebde7ae0b7
Add missing CHANGELOG due to v2.1.1 patch release (#4620) 2020-05-13 11:37:32 +01:00
Paul Stack 48f906e026
Allow pulumi stack export to decrypt secrets (#4046) 2020-05-11 19:16:30 +01: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
Lee Briggs 3e86202d5f
Merge pull request #4494 from pulumi/feature/gcs-retries
Retry bucket writes on error
2020-05-04 09:50:04 -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
stack72 d3ee61cfef Cleanup after v2.1.0 release 2020-04-29 21:49:21 +01:00
stack72 675c878364 Prepare for v2.1.0 release 2020-04-29 21:45:35 +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