pulumi/pkg/resource
Fraser Waters c39756e6de
Tests and fix for --target-dependents with explicit providers (#14238)
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
Fixes https://github.com/pulumi/pulumi/issues/13591.

This changes the logic for providers to always be targeted, this means
they can be skipped from --targets lists most of the time.

Because they don't need to be in the --targets list it makes the
behaviour of --target-dependents much more useful. If you want to update
a resource and it's children but it has an explicit provider you can
just --targets the resource.

If you want to use --target-dependents to target _all_ the resources
managed by an explicit provider that will work if the provider is in
--targets.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2023-10-18 13:10:22 +00:00
..
analyzer all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
deploy Tests and fix for --target-dependents with explicit providers (#14238) 2023-10-18 13:10:22 +00:00
edit Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
graph all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
provider all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
stack Move sdk/go/common/display to /pkg/display (#13954) 2023-09-18 11:01:28 +00:00
testdata ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00