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

fix rotate paths roundtripping #504

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nyobe
Copy link
Contributor

@nyobe nyobe commented Mar 28, 2025

As part of adding the retry-rotation button to the console, I realized that the rotation paths that we output as part of rotation results cannot be directly used as rotation path inputs. This is because rotation path inputs get implicitly prefixed by values., while the result paths are physical docpaths that already have the values prefix.

Right now the frontend works around this by strip the values.? prefix from the result paths, but this just exposes the fact that the prefixing doesn't actually work correctly for quoted keys like ["rotated-creds"] -> values.["rotated-creds"] -> invalid path

I think that doing this prefixing in eval.RotateEnvironment is probably a mistake. It was done to try to match the behavior of the paths used by the CLI. So, while this is technically a breaking change, I propose moving the prefixing behavior to the CLI instead, and have the eval apis just use physical docpaths consistently.

@nyobe nyobe requested review from pgavlin and seanyeh March 28, 2025 22:50
Copy link
Contributor

@IaroslavTitov IaroslavTitov left a comment

Choose a reason for hiding this comment

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

Would this break anything in pulumi-service? Probably have to manually update to the new version and fix up where you add values. in the console?

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.

3 participants