Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade output values in source_eval #15362

Merged
merged 1 commit into from Feb 6, 2024
Merged

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Feb 3, 2024

Description

Stage 1 of updating how we deal with OutputValues in source_eval for transforms.

This makes two changes that should result in basically a no-op for standard resources, but update all Computed/Secret values to OutputValues for Call and Construct.

This is a no-op for standard resources because previously we set "KeepOutputs" to false when we unmarshalled them. That replaced all OutputValues with Computed/Secret. Now we do "UpdgradeOutputs" at the start of source_eval but then call "DowngradeOutputs" before passing the properties on to the rest of the system. So this is a complete no-op.

But for Call/Construct we used to use "KeepOutputs" but now we do "UpgradeOutputs". So values that previously got sent as Computed/Secret will now get sent as OutputValue. This should be fine, all users of Construct/Call already had to handle OutputValue on their interface, so this just means a few more cases of seeing those values.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Feb 3, 2024

Changelog

[uncommitted] (2024-02-06)

Features

  • [engine] Translate all Computed and Secret values to OutputValues for Construct and Call methods.
    #15362

@Frassle Frassle force-pushed the fraser/outputDowngrade branch 9 times, most recently from e33d7ff to 77fc606 Compare February 6, 2024 13:32
@Frassle Frassle changed the title Downgrade output values in source_eval Upgrade output values in source_eval Feb 6, 2024
@Frassle Frassle marked this pull request as ready for review February 6, 2024 13:49
@Frassle Frassle requested a review from a team February 6, 2024 13:49
Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pkg/resource/deploy/source_eval.go Outdated Show resolved Hide resolved
sdk/go/common/resource/plugin/rpc.go Outdated Show resolved Hide resolved
@Frassle Frassle force-pushed the fraser/outputDowngrade branch 2 times, most recently from c054806 to cbb5a53 Compare February 6, 2024 15:52
@Frassle Frassle added this pull request to the merge queue Feb 6, 2024
Merged via the queue into master with commit 1138fdb Feb 6, 2024
46 checks passed
@Frassle Frassle deleted the fraser/outputDowngrade branch February 6, 2024 17:38
github-merge-queue bot pushed a commit that referenced this pull request Feb 7, 2024
Current draft release notes:


### Features

- [auto/go] Adds support for `--refresh` to Stack.Up(), Stack.Preview()
and Stack.Destroy() via go automation api
  [#15350](#15350)

- [cli] Adds a `preview-only` flag to `pulumi refresh`.
  [#15330](#15330)

- [cli] Adds `preview-only` flag for `pulumi destroy` and `pulumi
import`
  [#15336](#15336)

- [engine] Translate all Computed and Secret values to OutputValues for
Construct and Call methods.
  [#15362](#15362)

- [cli/display] Add --suppress-progress option to not print dots
  [#14690](#14690)

- [sdk/go] Add `UpgradeToOutputValues` to `MarshalOptions`.
  [#15349](#15349)

- [cli/plugin] Add experimental `plugin run` command for running plugin
binaries directly.
  [#12613](#12613)

- [sdkgen/python] Update the default minimum required version of Python
to 3.8 or greater for generated provider SDKs.
  [#15368](#15368)


### Bug Fixes

- [backend/diy] Fix an issue where state stored on a mounted device
would result in errors
  [#15375](#15375)

- [cli/state] Fix a panic when trying to delete a provider from the
state that's still referenced.
  [#15322](#15322)

- [cli/state] Fix a nil reference panic in the `state edit` command.
  [#15354](#15354)


### Miscellaneous

- [docs] Add kubernetes as a supported pulumi convert language
  [#15359](#15359)

- [sdk/python] Require Python 3.8 or greater.
  [#15363](#15363)

- [sdk/python] Upgrade grpcio to 1.60.1
  [#15366](#15366)
@justinvp justinvp mentioned this pull request Feb 7, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 8, 2024
### Features

- [auto/go] Adds support for `--refresh` to Stack.Up(), Stack.Preview()
and Stack.Destroy() via go automation api
  [#15350](#15350)

- [cli] Adds a `preview-only` flag to `pulumi refresh`.
  [#15330](#15330)

- [cli] Adds `preview-only` flag for `pulumi destroy` and `pulumi
import`
  [#15336](#15336)

- [engine] Translate all Computed and Secret values to OutputValues for
Construct and Call methods.
  [#15362](#15362)

- [cli/display] Add --suppress-progress option to not print dots
  [#14690](#14690)

- [sdk/go] Add `UpgradeToOutputValues` to `MarshalOptions`.
  [#15349](#15349)

- [cli/plugin] Add experimental `plugin run` command for running plugin
binaries directly.
  [#12613](#12613)

- [sdkgen/python] Update the default minimum required version of Python
to 3.8 or greater for generated provider SDKs.
  [#15368](#15368)


### Bug Fixes

- [backend/diy] Fix an issue where state stored on a mounted device
would result in errors
  [#15375](#15375)

- [cli/state] Fix a panic when trying to delete a provider from the
state that's still referenced.
  [#15322](#15322)

- [cli/state] Fix a nil reference panic in the `state edit` command.
  [#15354](#15354)


### Miscellaneous

- [docs] Add kubernetes as a supported pulumi convert language
  [#15359](#15359)

- [sdk/python] Require Python 3.8 or greater.
  [#15363](#15363)

- [sdk/python] Upgrade grpcio to 1.60.1
  [#15366](#15366)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants