-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow .
in Environment Variable Names
#3760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also fix our environment variable parsing library? https://github.com/hashicorp/go-envparse/blob/master/envparse.go#L116-L144
I don't want to merge this until we have parity in our environment variable parsing library.
@schmichael, upon further reflection, based on the ask to adjust go-envparse, I ended up thinking that this might not be the best course of action. In the case of shell environment variables, dots have mixed support, tending to the unsupported. So for drivers like exec and raw_exec this type of change could allow for unreadable variables. I was able to find what appears to be the Spring Boot workaround using the Docker seems to happily allow the creation of a dotted environment variable via their |
An additional comment I have received on this issue for further discussion.
|
This sample job outputs (as viewed with
Meaning Switching to So I'm inclined to accept this PR (if we also update the library as stated before) as it seems dots are fairly widely supported even if bash does not let you interactively set them. |
From https://github.com/appc/spec/blob/master/spec/aci.md: > environment (list of objects, optional) represents the app's environment variables (ACE can append). The listed objects must have two key-value pairs: name and value. The name must consist solely of letters, digits, and underscores '_' as outlined in IEEE Std 1003.1-2008, 2016 Edition, with practical considerations dictating that the name may also include periods '.' and hyphens '-'. The value is an arbitrary string. These values are not evaluated in any way, and no substitutions are made. Dotted environment variables are frequently used as a part of the Spring Boot pattern. (re: ZD-6116) See also [Nomad PR# 3760](hashicorp/nomad#3760)
@schmichael - Made PR for go-envparse hashicorp/go-envparse#2 |
Mind updating go-envparse in this PR? Should be: go get -u github.com/hashicorp/go-envparse
govendor update github.com/hashicorp/go-envparse
# git commit + push |
From [https://github.com/appc/spec/blob/master/spec/aci.md](https://github.com/appc/spec/blob/master/spec/aci.md): >environment (list of objects, optional) represents the app's environment variables (ACE can append). The listed objects must have two key-value pairs: name and value. The name must consist solely of letters, digits, and underscores '_' as outlined in IEEE Std 1003.1-2008, 2016 Edition, with practical considerations dictating that the name may also include periods '.' and hyphens '-'. The value is an arbitrary string. These values are not evaluated in any way, and no substitutions are made. Dotted environment variables are frequently used as a part of the Spring Boot pattern. (re: ZD-6116) This PR specifically doesn't address the conversion of hyphens (`-`) due to an issue with rkt [[Nomad GH # 2358]](#2358).
Mention the changes from #3760 in the upgrade docs as applications expecting underscores will break.
Mention the changes from #3760 in the upgrade docs as applications expecting underscores will break.
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
From https://github.com/appc/spec/blob/master/spec/aci.md:
Dotted environment variables are frequently used as a part of the Spring Boot pattern. (re: ZD-6116)
This PR specifically doesn't address the conversion of hyphens (
-
) due to an issue with rkt [Nomad GH # 2358].