Commit graph

6540 commits

Author SHA1 Message Date
Fraser Waters 20eaa27b3d fix test 2021-11-17 15:58:52 +00:00
Fraser Waters de3e95b7ab Check more constraints 2021-11-17 15:49:17 +00:00
Fraser Waters 23e9ec2c54 Fix aliased 2021-11-17 08:59:51 +00:00
Fraser Waters 3b9cf5b648 Adds/Deletes/Updates 2021-11-16 16:26:51 +00:00
Fraser Waters 40400b664b Better constraint diffs 2021-11-16 14:29:04 +00:00
Fraser Waters 878c2bb28a typo 2021-11-15 10:58:07 +00:00
Fraser Waters 83e655e19f Merge remote-tracking branch 'origin/master' into ctpp 2021-11-15 10:02:29 +00:00
Fraser Waters b1a64a65ca Hide behind envvars 2021-11-15 09:58:30 +00:00
Ian Wahbe 272c4643b2
Update error handling (#8406)
This is the result of a change applied via `go-rewrap-errors`.
2021-11-12 18:37:17 -08:00
Ian Wahbe 164a2ec818
Enable output marshaling in .NET (#8316) 2021-11-12 14:58:34 -08:00
Anton Tayanovskyy 5dd7851293
PBT for dependency_graph (#8404) 2021-11-12 15:12:48 -05:00
Paul Stack 74ba28ad55
[CLI] Adding the ability to create a default org for backends that support orgs (#8352) 2021-11-12 20:44:51 +02:00
Joe Duffy 0a38bc295c
Fix issue with --target deletion dependent calculation (#8360)
* Fix issue with --target deletion dependant calculation

The code that computed --target deletion dependants was not correct.
It used parent/child component relationships, but did not respect actual
DAG dependencies. As a result, it could erroneously leave hanging
references to resources that no longer exist after performing a
`pulumi destroy --target X` operation. This manifested in bugs like
https://github.com/pulumi/pulumi/issues/6283, which is fixed by this
change. The solution is to compute the (transitive!) dependency graph
correctly, factoring in both parent/child, as well as explicit and
implicit, dependencies. The existing logic does the correct thing once
we do this. I've also added tests for this area, including regression
tests that cover transitive dependency relationships, as well as ones
that would cause an infinite loop given a naive implementation.

* Add a changelog entry

* Fix failing test to include all destroyed targets

Unless I'm missing something, the entire tree should be deleted
in this test case because A is the ancestor for the entire tree.

* Use DependencyGraph to compute dependents

Per code review feedback from @pgavlin.

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
2021-11-12 10:02:51 -05:00
Levi Blackstone 0d4fb3e340
[schema] Add IsOverlay option to disable codegen for particular types (#8338)
Add a new `IsOverlay` option to schema types and functions that allows providers to document overlays in the schema. This makes it easier to generate API docs consistently, even for code that is generated outside of the typical codegen process.
2021-11-11 17:00:03 -07:00
Ian Wahbe fbeac6fc10
Improve corrupt workspace settings experience (#8393)
* Improve corrupt workspace settings experience

This improvement comes in two parts.

1. The error message for a corrupt workspace settings file now clearly
indicates both the file and the parsing error.

2. Writing the workspace settings is now atomic. This prevents
corruption from multiple concurrent calls.

* Use builtin atomic write

* Use builtin ioutil.TempFile

* Change tmp file dir
2021-11-11 14:58:39 -08:00
Anton Tayanovskyy c6b8168423
Cleanup CHANGELOG_PENDING after 3.17.1 (#8392) 2021-11-11 14:39:56 -08:00
Fraser Waters c6240cf38d
Improve vscode dotnet support (#8384)
* Run make ensure on devcontainer creation

Added an ensure target to the dotnet makefile to run `dotnet restore`.

* Add dotnet test explorer and set default vscode settings for it

* Ensure PULUMI_LOCAL_NUGET exists

* Add missing mkdirs
2021-11-11 20:40:18 +00:00
Fraser Waters 5b6a03f548 Delete plan cmd, rename arguments to preview and up 2021-11-11 10:40:01 +00:00
Fraser Waters e2c5f12d65 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-11 10:05:00 +00: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
Vivek Lakshmanan d7ec7ce06c
Merge pull request #8394 from pulumi/vl/Integration
Move AssertHTTPResultWithRetry from pulumi-eks utils
2021-11-09 16:56:25 -08:00
Vivek Lakshmanan aa9bed5508 Fix linting 2021-11-09 15:41:28 -08:00
Vivek Lakshmanan d401912902 Move AssertHTTPResultWithRetry from pulumi-eks since its usable across integration tests 2021-11-09 14:41:09 -08:00
Ian Wahbe 6057dc3362
Validate python version (#8368)
* Validate python version

Note: we do this at the language plugin level because extremely old
version of python (python2) have different syntax, and we don't want
parse errors to occlude our version message. Similarly, if we rely on a
3.7 feature during an import, we will have the same problem. 

* Set minimum python version to 3.7.0

* Fix displayed recommended version
2021-11-09 14:22:16 -08:00
Anton Tayanovskyy ac3f0a36c2
Update pkg -> sdk dependency for 3.17.1 (#8391) 2021-11-09 16:54:45 -05:00
Anton Tayanovskyy 9c707b3baf
Prepare for v3.17.1 release (#8390) 2021-11-09 16:38:21 -05:00
Fraser Waters a526db129a
Move gopls settings to .vscode from .devcontainer (#8383)
These gopls settings should apply to any vscode instance, not just ones in devcontainers.
2021-11-09 10:54:52 +00:00
Anton Tayanovskyy afcbcd3a51
7947: docgen for $fnOutput forms (#8293)
* Toward doc gen of fn.Output version signatures

* Fixup Python docgen, and reorder forms so the direct form comes firs

* Respect go opt-out flag

* Fix tempalte bug with unbalanced HTML tags

* Edit CHANGELOG_PENDING.md

* Merge codeblocks in the function template

* Accept docs changes
2021-11-08 17:07:09 -05:00
Komal 9a30f36c93
[auto/python] - Fix deserialization of event (#8375)
Fixes the deserialization for the `metadata` property on `ResourcePreEvent`, `ResOutputsEvent` and `ResOpFailedEvent`.
2021-11-08 13:05:04 -08:00
Fraser Waters b96e6a4204
Increase default go test timeout (#8380)
Our makefiles always run go test with a 1h timeout. This updates the default vscode settings to the same.
2021-11-08 18:07:24 +00:00
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