Commit graph

6610 commits

Author SHA1 Message Date
Anton Tayanovskyy e37892ac4a
Fix 8322 (#8339)
* Fix 8322

* Untabify

* Untabify again

* Yet More untabify

* More untabify

* Final untabify

* Add CHANGELOG_PENDING

* Apply suggestions from code review

Co-authored-by: Justin Van Patten <jvp@justinvp.com>

* PR feedback

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-11-08 10:45:26 -05:00
Fraser Waters feaccb1fe1 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-08 13:44:13 +00:00
Fraser Waters 9865fa58e3 Pop op before constraint check 2021-11-08 13:19:35 +00:00
Fraser Waters c41981a84f More tests 2021-11-08 12:40:10 +00:00
Anton Tayanovskyy 99fdad0ed9
Fix python dependencies issues in GHA (#8361) 2021-11-06 00:55:17 -07:00
Fraser Waters 1db1ab5137 notes 2021-11-05 18:44:10 +00:00
Fraser Waters 82222cc19e property set shrink test 2021-11-05 14:56:49 +00:00
Fraser Waters 775ace8f13 rm Paths() 2021-11-05 08:55:07 +00:00
Fraser Waters 12c0188329 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-04 21:00:51 +00:00
Fraser Waters f8a98b2a86
Fix devcontainer Dockerfile build (#8358)
Something has changed in the base image such that the directory
/etc/sudoers.d doesn't exist. Simple fix, `mkdir -p` that directory
before we write to it.
2021-11-04 21:00:32 +00:00
Fraser Waters 3e73c036fb Fix test for missing creates 2021-11-04 19:32:11 +00:00
Fraser Waters f4c28053f8 Test missing create 2021-11-04 16:52:39 +00:00
Justin Van Patten 414ef7e9d0
[programgen/go] Don't change imported resource names (#8353)
When importing a resource in Go, we change resource names with hyphens to snake_case. This happens because we introduced a change that converts the resource name to a valid Go identifier so it can be used as a local variable. But we were also using this converted name as the string resource name, which causes problems with import: the imported resource in the state file has the original resource name, but the generated program uses the converted name, causing Pulumi to delete and recreate the resource when adopting the generated import code.

This change fixes the issue by maintaining the original resource name, and only using the converted name for variables.
2021-11-04 09:28:48 -07:00
Fraser Waters d995901fa7 Test expected delete 2021-11-04 15:51:46 +00:00
Fraser Waters 505e4c5d06 Test expected deletes 2021-11-04 15:26:01 +00:00
Fraser Waters 5352638e51 lint 2021-11-04 11:54:04 +00:00
Fraser Waters fdea5bb588 Readd test_plan.go 2021-11-04 11:22:20 +00:00
Fraser Waters b5eb955301 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-04 10:07:10 +00:00
Fraser Waters b58c39476f
Fix cmdutil.PrintTable to handle ansi escapes and non-byte glyphs (#8344)
Fixes two bugs in how padding was calculated in PrintTable.

Firstly we remove all ANSI escape codes from the string before measuring
how wide it is. Secondly we measure glyph count (using rivo/uniseg) not
byte or rune count of the string.

Together these fix the padding/alignment issues I saw when using
PrintTable with plan output. They also slightly change the layout of
"pulumi stack", for example the below is printed with current master and
has 6 characters of space for padding between SecurityGroup and
web-secgrp:

```
Current stack resources (4):
    TYPE                                        NAME
    pulumi:pulumi:Stack                         aws-cs-webserver-test
    ├─ aws:ec2/securityGroup:SecurityGroup      web-secgrp
    ├─ aws:ec2/instance:Instance                web-server-www
    └─ pulumi:providers:aws                     default_4_25_0
```

While printed with this commit you only get 2 characters of space for
padding (which is correct, the column gap is set to "  "):
```
Current stack resources (4):
    TYPE                                    NAME
    pulumi:pulumi:Stack                     aws-cs-webserver-test
    ├─ aws:ec2/securityGroup:SecurityGroup  web-secgrp
    ├─ aws:ec2/instance:Instance            web-server-www
    └─ pulumi:providers:aws                 default_4_25_0
```
2021-11-04 10:06:20 +00:00
Anton Tayanovskyy 7dd1865575
Clean up changelog (#8351) 2021-11-03 17:17:53 -04:00
Justin Van Patten 4043137c35
Clean CHANGELOG_PENDING.md after v3.17.0 release (#8350) 2021-11-03 13:55:43 -07:00
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
Fraser Waters b1e23a5287 More tests 2021-11-03 15:56:42 +00:00
Fraser Waters 83e2cd7e4a Fix cmdutil.PrintTable to handle non-simple strings 2021-11-03 10:24:42 +00: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
Fraser Waters 8fae881a81 Fix colors 2021-11-02 22:41:17 +00: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
Fraser Waters 1b59952a20 Test and fix PropertyPath.String() 2021-11-02 15:25:36 +00:00
Fraser Waters 155c035e34 Liniting and test fixing 2021-11-02 13:52:21 +00:00
Fraser Waters 0d9043f6a2 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-02 09:19:17 +00: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
Pat Gavlin 90b75141cb fixup 2021-10-29 09:07:02 -07:00
Pat Gavlin 365bfd2ef8 fix diff 2021-10-29 08:44:33 -07:00
Pat Gavlin 954bdc025b WIP: outputs in plans 2021-10-29 08:44:33 -07:00
Pat Gavlin 24a0eb0274 fixes for rebase breaks and diffs 2021-10-29 08:44:33 -07:00
Pat Gavlin 908c3aeb70 Update message 2021-10-29 08:44:31 -07:00
Pat Gavlin 6de090c540 Renames 2021-10-29 08:44:03 -07:00
Pat Gavlin 2818c9888d constraints 2021-10-29 08:43:21 -07:00
Pat Gavlin bbfd8256de plan renderer 2021-10-29 08:43:20 -07:00
Pat Gavlin 13f8d342ce Update wording 2021-10-29 08:43:20 -07:00
Pat Gavlin e101f80839 Plumb plans through the CLI. 2021-10-29 08:43:18 -07:00
Pat Gavlin 33e8980cee Implement resource plans in the engine 2021-10-29 08:42:44 -07: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