Commit graph

6472 commits

Author SHA1 Message Date
Justin Van Patten 7e2c74d58c
Delete redundant docker step from release workflow (#8347) 2021-11-03 20:51:31 +02:00
Justin Van Patten f989e1cc9d
Update pkg -> sdk dependency (#8346) 2021-11-03 11:25:20 -07:00
Justin Van Patten 5b10c99bab
Prepare for v3.17.0 release (#8345) 2021-11-03 11:01:03 -07:00
Pat Gavlin af151b60c5
[codegen/go] Slightly simplify enum type gen. (#8341)
- Remove enumElementType, whose functionality duplicates work done in
  argsTypeImpl
- Clarify the args- vs. Go-ness of the two element types

This is prep work for #7943. These changes should not produce codegen diffs.
2021-11-02 17:41:06 -07:00
Emiliza Gutierrez 14211eea10
Updating requirements.txt to use 3.x series of pulumi (#8337) 2021-11-02 15:25:26 -07:00
Emiliza Gutierrez d243efae19
Revert "[python/sdk] - Remove python 3.6 support (#8161)" (#8332)
This reverts commit 895ae970ac.
2021-11-02 10:19:01 -07:00
Ian Wahbe e629bc32d5
Expand dependencies when marshaling output values (#8301)
* Expand dependencies when marshaling output values

[sdk/python]

* Update CHANGELOG_PENDING.md

* Use existing code

* Fix lint
2021-11-01 11:10:27 -07:00
Anton Tayanovskyy 343b4a3501
Fix #8172 (#8320)
* Fix #8172

* Accept test baselines

* Update CHANGELOG_PENDING
2021-11-01 13:21:01 -04:00
Fraser Waters 6890b9acc9
Check in default vscode settings (#8319)
Currently this is just setting go.buildTags to "all" so the language
specific tests are included in build and test commands by default.

Missing this leads to the confusing (at least to new people) behavior
of clicking run test on a test method and vscode then saying there is no
test to run.
2021-11-01 15:15:21 +00:00
Fraser Waters d39a14432f
Don't throw on type mismatches in the dotnet sdk (#8286)
* Don't throw on type mismatches in the dotnet sdk

Fixes #7329

The converter will no longer throw if resource providers return data
that does not match the expected type declared in the dotnet sdk.
Instead a warning will be logged for the resource and the value will be
set to `default(T)`.
2021-10-29 17:35:17 +01:00
Fraser Waters e71fd81fe8
Type inference for out var differs by compiler (#8312)
While our CI seems happy with this line of code on master, my machine
with the 3.1 sdk is resolving it to non-nullable type and complaining
about the "= null" line later.

```
LocalWorkspace.cs(389,27): error CS8600: Converting null literal or
possible null value to non-nullable type.
[/workspaces/pulumi/sdk/dotnet/Pulumi.Automation/Pulumi.Automation.csproj]
```

Quick fix to just not use "var" here.
2021-10-29 16:29:45 +01:00
Ian Wahbe e38876f7af
[sdk/go] Respect default parent in go aliases. (#8288)
* Respect default parent in go aliases.

* Update changelog

* Handle empty parrents correctly

* Allow specifying no parent

* clarify variable name

* Improve `Unparent` ergonomics

* Take t0yv0's suggestion

* Adopt @t0yv0's tests and doc comments.

* Make NoParent,Parent,ParentURN mutually exclusive
2021-10-28 17:25:31 -07:00
Fraser Waters 470893a980
Fix module names to match paths (#8304) 2021-10-28 16:18:15 +01:00
Ian Wahbe 83e24765f3
.NET & python SDKs parity for bad pulumi versions (#8297)
* .NET & python SDKs parity for bad pulumi versions

They handle invalid Pulumi CLI version gracefully.

* Make python version property lazy

* Clarify .NET logic

* Add python test for validate_pulumi_version

* Add tests for invalid versions

* Fix python test

* Fix typo

* Fix tests

* Have _validate_pulumi_version handle parsing

* Modify python and .NET to parseAndValidate

* Modify typescript and go to parseAndValidate

* fix name
2021-10-27 20:54:23 -07:00
Praneet Loke 9a78ca1ca4
[codegen/schema] Add DisplayName and Publisher to the schema (#8276) 2021-10-27 12:53:09 -07:00
Komal 895ae970ac
[python/sdk] - Remove python 3.6 support (#8161) 2021-10-27 10:35:46 -07:00
Justin Van Patten fbf62399ca
[sdk/go] Fix regression marshaling assets/archives (#8290)
This change fixes a regression marshaling assets/archives that was introduced after adding support for marshaling output values.

For example, when setting an `Asset` on a field typed as `AssetOrAchiveInput`, in `marshalInput`, the input was being converted into an `AssetOrArchiveOutput` via the `ToAssetOrArchiveOutputWithContext`. Awaiting the output returns an `*asset` struct, which is itself an `AssetInput`, which causes infinite recursion when passed recursively to `marshalInput`.

The fix is to skip the `Input` checks in recursive calls, which is equivalent to the previous behavior before the regression was introduced.

Another issue was that when the input is converted to an output, this would result in `marshalInput` always returning an output value, even if the original passed-in value was not an output. To address this, if the output's value is known, not a secret, and has no dependencies, we can return the value itself rather than wrapping it as an output.
2021-10-27 08:44:42 -07:00
Ian Wahbe 530641576d
[codegen/go] allow plain default types (#8254)
* Respect `plain` when generating default values.

* Add new test

* Simplify test case

* Add indirection to allow taking references

* Reflect indirection problem in tests

* Remove Plain fields. Base off of primitive type

* Reenable docs

* Update changelog

* Implement always default solution

* Fix test by pulling in master

* Add enum test and cleanup

* Fix const handling

* Clarify the changelog
2021-10-26 17:18:48 -07:00
Komal 2f433d64b7
[cli] Emit JSON events for updates via --json flag (#8275) 2021-10-26 16:21:27 -07:00
Ian Wahbe c8e117a37d
Handle invalid Pulumi CLI version (#8289)
* Handle invalid Pulumi CLI version

* Add clarifying comments and improve error message.

* Update go version of `validatePulumiVersion`
2021-10-26 16:20:45 -07:00
Fraser Waters a199ba8bb5
Fix race condition in TaskMonitoringHelper (#8294)
* Fix race condition in TaskMonitoringHelper

Fixes #8163

TaskMonitoringHelper was using two seperate trackers for Idle and
FirstException and then calling WhenAny on both to see which state
happened first. This was racy as you could end up completing a task with
an exception but getting the idle tracker fire first, resulting in
TaskMonitoringHelper thinking no exception had happened.

I've combined the two trackers into TaskMonitoringHelper now. At each
task completion we check for exceptions and then idleness.

* Add changelog
2021-10-26 22:37:47 +01:00
Ben Schiborr df61004e3f
Ability to require minimum Python version (#8296)
Co-authored-by: Komal <komalsali@gmail.com>
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-10-26 14:33:21 -07:00
Carlos Tadeu Panato Junior 1c0a7e4907
reformat error message string (#8284)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-10-26 14:55:25 -06: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 b39c81e4cb
Improve error message and add test for #1440 (#8268)
* Improve error message and add test for #1440

* lint

* lint

* Use %w instead of errors.Wrap
2021-10-26 16:55:52 +01:00
svangordon-fruit 22d2ef247f
Allow hyphens in middle portion of token (#8282) 2021-10-25 17:15:17 -07:00
Liam White 6e3e17ef28
Enable workaround for Yarn workspaces for inline functions (#8215)
See https://github.com/pulumi/pulumi/issues/2661\#issuecomment-939531284 for context.

Bascially, yarn workspaces rely on symlinks for monorepo-local packages.

I think this also resolves https://github.com/pulumi/pulumi/issues/2980

Signed-off-by: Liam White <liam@tetrate.io>
2021-10-25 10:13:09 -07:00
Anton Tayanovskyy 979f8d5c85
Clean CHANGELOG_PENDING.md after v3.16.0 release (#8272) 2021-10-20 14:16:56 -04:00
Anton Tayanovskyy b8514450b5
Update pkg -> sdk dependency for v3.16.0 (#8271) 2021-10-20 14:11:38 -04:00
Anton Tayanovskyy 12a5a52aab
Prepare for v3.16.0 release (#8270) 2021-10-20 14:08:34 -04:00
Fraser Waters 02ed28dd8c
Update go version in brew command line in CONTRIBUTING.md (#8258)
The go version in the brew command line didn't match the version of go listed above in the list of requirements.
2021-10-20 09:30:39 +01:00
Praneet Loke d73c380bef
[codegen/docs] Sort the package tree items (#8262)
* Sort the modules, resources and functions individually as the package tree is created

* Update package tree test
2021-10-19 15:21:39 -07:00
Anton Tayanovskyy cb51313512
Cover GetAmiIds at unit test level (#8261) 2021-10-19 18:18:25 -04:00
Ian Wahbe f12b8fa00c
Cleanup program-gen test dependency gathering (#8248) 2021-10-19 12:17:19 -07:00
Fraser Waters 285ffca793
Some improvements to the vscode devcontainer (#8243)
* Installed the go, dotnet, and python extensions by default.
* Set the gopls settings to ignore copies of modules in build directories.
* Set XDG_CACHE_DIR/CONFIG_DIR so that vscode can install go tools.
* Use "containerEnv" instead of "runArgs" to set the container environment.
* Turn on gopls "experimentalWorkspaceModule" so we can open at the root pulumi directory.
* Use "postCreateCommand" to restore all dotnet projects so ominisharp doesn't complain about missing types on startup.
2021-10-19 08:31:42 +01:00
Josh Studt caf5fcd525
[auto/dotnet] - pulumi state delete & unprotect functionality (#8202)
Co-authored-by: Komal <komal@pulumi.com>
2021-10-18 16:26:45 -07:00
Anton Tayanovskyy e710125885
5758 for C#/.NET (#7899)
* Rebase 5758 .NET work and make output-funcs pass

* Propagate changes to the other examples

* CHANGELOG

* Address PR feedback

* Add a test reproducing aws-native compilation failure

* Fix dangling type ref issue in the .NET backend for codegen

* Accept changes and unskip simple-methods-schema compile check

* Accept changes in node, python, go codegen

* SDK changes to enable a better implementation approach

* Switch approach to support functions like GetAmiIds; avoid name conflicts under tfbridge20

* Make all dotnet tests pass, mechanical fixes + accept test output

* Accept python changes

* Accept node output

* Accept docs changes

* Deepen the unit test to cover the interesting helper type

* Accept go changes and fixup tests

* Implement dep propagation through Invoke

* Fixup cyclic-types

* Accept codegen

* NOTE we now require .NET SDK 3.15 or higher
2021-10-18 18:18:15 -04:00
Emiliza Gutierrez 5f70bccaca
Revert "Pin goreleaser to v0.181.1 (#8216)" (#8247)
This reverts commit 793c7db172.
2021-10-18 10:33:33 -07:00
Paul Stack 7ef0b83c0c
Ensuring Helm based components for CodeDNS and Cert Manager are available in title Lookups" (#8244) 2021-10-18 15:24:46 +03:00
Praneet Loke 0f5b7c765b
[codegen/docs] Update API docs templates to include layout front-matter param (#8242)
* Update generation templates

* Updated templates for codegen

* Rm api-doc-resource template

* Update templates to use layout:api and no alias

* Set no_edit_this_page to true in the header and index templates used by docs gen.

* Update docs generation baseline test files with template updates

* Remove the notion of menu from resource templates (#8200)

* Update the title lookup map entry for aws-api-gateway

* Updated CSS classes for icons in API docs template

* Updated tests:

* Additional test file updates

* Fixup package names

Co-authored-by: Devon Grove <devon@pulumi.com>
Co-authored-by: Christian Nunciato <c@nunciato.org>
Co-authored-by: stack72 <public@paulstack.co.uk>
2021-10-17 22:36:31 -07:00
Fraser Waters a45f408c49
Deduplicate a couple of go module names (#8232)
Picked these duplicates up when running gopls across the whole repo.
Module names should reflect the folder path they are in, but these two
looked like copy-paste bugs.
2021-10-15 14:21:12 +01:00
Fraser Waters 502917c0e7
Update golint in devcontainer (#8218) 2021-10-15 11:15:48 +01:00
Anton Tayanovskyy 1bd2e7beb4
Clean CHANGELOG_PENDING.md after v3.15.0 (#8229) 2021-10-14 21:12:12 -04:00
Anton Tayanovskyy a6e02d6dd8
Update pkg and tests pulumi/sdk refs to v3.15.0 (#8227) 2021-10-14 21:05:42 -04:00
Anton Tayanovskyy 6a93a60115
Prepare for v3.15.0 release (#8221) 2021-10-14 16:32:39 -07: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
Ian Wahbe dbc5979501
iwahbe/add aditional input registration types (#8204)
* Add registration for resources and enums

* Update tests

* Fix enum registration instances

* Update changelog

* Add the rest of the reference types

* Fix nit

* Remove reference from Map and Array types
2021-10-14 10:41:40 -07:00
Emiliza Gutierrez 793c7db172
Pin goreleaser to v0.181.1 (#8216) 2021-10-14 13:06:24 -04:00
Cameron Stokes 562c9da008
Fix help message to fix formatting on docs page (#8211) 2021-10-13 15:29:52 -07:00
Ian Wahbe e07d96af9e
Pin grpc version (#8214) 2021-10-13 13:44:55 -07:00