Commit graph

6564 commits

Author SHA1 Message Date
Fraser Waters e182cf0ff3 lint 2021-11-19 16:17:32 +00:00
Fraser Waters 1ddd452faa Fix TestExplicitDeleteBeforeReplace 2021-11-19 16:06:21 +00:00
Fraser Waters 7143b728b7 Fix TestGetRefreshOption 2021-11-19 14:43:33 +00:00
Fraser Waters 6d02c4adc8 Auto refresh if using plans 2021-11-19 14:29:30 +00:00
Fraser Waters b3d8cd9870
Update pkg/cmd/pulumi/preview.go
Co-authored-by: Alex Mullans <a.mullans@pulumi.com>
2021-11-19 14:24:47 +00:00
Fraser Waters 9032552d69
Update pkg/cmd/pulumi/up.go
Co-authored-by: Alex Mullans <a.mullans@pulumi.com>
2021-11-19 14:24:33 +00:00
Fraser Waters c1047fb3d9 linting 2021-11-19 14:11:12 +00:00
Fraser Waters 9739ff0eed Fix more tests 2021-11-18 12:27:22 +00:00
Fraser Waters 4fa395b03d Fix same resource test 2021-11-18 11:39:41 +00:00
Fraser Waters 598f2c7213 Resource sames test 2021-11-18 09:59:52 +00:00
Fraser Waters 96af4684db revert stack changes 2021-11-17 16:18:27 +00:00
Fraser Waters 844e8f0c1e Merge remote-tracking branch 'origin/master' into ctpp 2021-11-17 16:16:13 +00:00
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
Ian Wahbe 3329d81c1a
Update command respects --target-dependents (#8395)
* Update command respects `--target-dependents`

* Update CHANGELOG_PENDING.md

* Depend on parent and provider

* Add tests for new feature

* Separate predicate and mutation in code

* Remove `targetDependentsForUpdate`

* Refactor `isTargetedForUpdate`

* Add very important nil check
2021-11-16 17:12:36 -08:00
Pat Gavlin a1339277f0
[schema] Add enum overlay support. (#8425)
And update the metaschema to accommodate the `isOverlay` properties
added in #8338. Overlay enums, like other overlay members, are
implemented out-of-band by the declaring package. Code generators should
not generate declarations for overlay enums.
2021-11-16 15:53:28 -08:00
Luke Hoban ed769377dc
[sdk/python] Avoid 'referenced before assignment' error (#7135)
We have seen cases where a lot of errors like this are reported:

```
UnboundLocalError: local variable 'resources' referenced before assignment
```

This change prevents this failure mode, which might be a symptom of some
other issue, but currently obscures it in the error path.
2021-11-16 13:57:09 -08:00
Justin Van Patten ba39ed9ad4
Add tests that return failures from Call (#8424)
- [sdk/nodejs] - Allow returning failures from Call in the provider without setting result outputs.
- [sdk/go] - Allow specifying Call failures from the provider.
- Add tests that return failures from Call.
2021-11-16 08:58:46 -08: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
Emiliza Gutierrez a7783f26de
Fixing broken lists in dotnet docs (#8178)
* Fixing broken lists in dotnet docs

* update changelog
2021-11-15 17:40:19 -08:00
Justin Van Patten f6cc3d375c
Add output values integration tests (#8421) 2021-11-15 15:42:04 -08:00
Anton Tayanovskyy 372ddc7e5c
Skip flaky tests for now (#8420) 2021-11-15 15:17:20 -05:00
Ian Wahbe 554660b23a
Implement the --exclude-protected feature (#8359)
* Implement the --exclude-protected feature

This piggybacks on the same machinery used by the --target flag. By
examining the stack, we find a list of all resources managed by
Pulumi (in that stack). We then form them into a DAG, and mark all
resources as either protected or unprotected.

A resource is protected it has the `Protect` flag set or is has a child
with the `protect` flag set. It is unprotected otherwise.

We then pass the urns of unprotected resources to the update options
passed to the destroy operation in the same way that `--target` does.

* Update changelog

* Handle providers correctly

* Add integration test

* Protect dependencies of protected resources

* Handle --exclude-protected in separate function

* Simplify implementation via DependencyGraph

* Add TransitiveDependenciesOf

* Cleanup unused functions

* Gate printed message behind !jsonDisplay

* Ensure provider is not `""`

* Clean up documentation (and some code)
2021-11-15 11:45:14 -08:00
Justin Van Patten 10ceee406e
[sdk/nodejs] Unmarshal output values in component provider (#8205)
This adds support for unmarshaling output values in the Node.js provider.
2021-11-15 11:22:44 -08:00
Justin Van Patten c4c1f3d449
Add tests that create resources from methods (#7701) 2021-11-15 11:17:53 -08:00
Ian Wahbe d3b2dedd1d
[sdk/python] Unmarshal output values in component providers (#8212) 2021-11-15 10:12:12 -08:00
Adam Wilczek a5f72ddbeb
Added a buildkite detector for detecting the correct env vars in CI (#7933)
* Added a buildkite detector for detecting the correct env vars in CI

* adding pending changelog entry

* fixed PR logic to actually match the Buildkite Docs and simplified if statement, Fixed a few typos in comments and added PR to CHANGELOG_PENDING.md

* made PR number fetch easier to read

* fixing typo in comment
2021-11-15 09:10:07 -08: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