pulumi/pkg/engine/lifecycletest
Fraser Waters efea0d9ceb
Warn if StackReferences are registered instead of read (#14678)
<!--- 
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. -->

Noticed this while looking at
https://github.com/pulumi/pulumi-yaml/issues/462 with @julienp.

StackReferences only really work properly when 'read'. When registered
they don't behave as expected because they don't diff (no input
properties change) so they don't update so they don't get the new stack
output values.

Looks like all the SDKs but YAML we're doing this correctly, so I've
updated the engine test to do a read and will change the
check/diff/create methods to log a warning that the user SDKs must be
old. At some point we can clean these up to just only allow reading of
stack reference types.

## 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
  - [ ] 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-12-03 08:46:37 +00:00
..
alias_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
analyzer_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
delete_before_replace_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
golang_sdk_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
import_test.go Pass inputs to read as inputs and state (#14683) 2023-12-02 14:39:38 +00:00
pending_delete_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
provider_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
pulumi_test.go Warn if StackReferences are registered instead of read (#14678) 2023-12-03 08:46:37 +00:00
refresh_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
resource_reference_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
step_generator_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00
target_test.go Error if a resource's parent is a skipped create (#14672) 2023-12-02 22:37:12 +00:00
test_plan.go Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
update_plan_test.go Update golangci-lint (#14624) 2023-11-21 15:16:13 +00:00