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

Some stack outputs cannot be saved to Secret #743

Closed
EronWright opened this issue Nov 7, 2024 · 1 comment · Fixed by #746
Closed

Some stack outputs cannot be saved to Secret #743

EronWright opened this issue Nov 7, 2024 · 1 comment · Fixed by #746
Assignees
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@EronWright
Copy link
Contributor

EronWright commented Nov 7, 2024

What happened?

Stack outputs have a free-form name, for example an output might be named foo bar (i.e. has whitespace). Such outputs cannot be stored into the Secret that is associated with the Update object, and the controller sees an error from the API Server to the effect that the secret cannot contain a key with an invalid name.

data[foo bar]: Invalid value: "foo bar": a valid config key must consist of 
alphanumeric characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', 
regex used for validation is '[-._a-zA-Z0-9]+')

Example

Make a simple program that emits an output with an abnormal name.

name: example
runtime: yaml
outputs:
  "foo bar": "baz"

Output of pulumi about

CLI          
Version      3.132.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME  VERSION
language  yaml  unknown

Host     
OS       darwin
Version  14.5
Arch     arm64

Additional context

The solution is assumedly to sanitize the name to conform with the restriction. An alternative would be to pack all the outputs into a single key, but that would make the Secret be less useful.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@EronWright EronWright added impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 7, 2024
@EronWright EronWright changed the title Stack outputs cannot be saved to Secret Some stack outputs cannot be saved to Secret Nov 7, 2024
@blampe
Copy link
Contributor

blampe commented Nov 7, 2024

The solution is assumedly to sanitize the name to conform with the restriction. An alternative would be to pack all the outputs into a single key, but that would make the Secret be less useful.

Agree sanitizing the key seems the most reasonable.

@blampe blampe removed the needs-triage Needs attention from the triage team label Nov 7, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants