-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add types & functions to parse env config #76
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.
[suggestion (nb)] What would you think about expanding most variable names? JobResponseData
instead of JobResData
and similar changes. I was having some trouble with remembering what the shortened versions stood for as I read through
I had read Go's conventional style to favor shorter variable names, and so I've been tending to make them shorter than I'm generally accustomed to. In most cases so far I've felt good about it, but I was having the same problem yesterday trying to remember names related to the cloud.gov code and have also been thinking that I have been over-correcting (was planning to update So I'm a bit on the fence RE "most" names and might prefer to address them more individually, if you don't mind. In the case of Otherwise I'd adjust based on the usage scope and frequency. So I'd do |
I don't mind at all. re: |
I don't think I understand, I'd have said JobRes is an HTTP response? |
Is it? I was(am) honestly a bit confused about where it came from and how it differs from CUSTOM_CI_ |
Yeah Shall we keep it as |
runner/cfd/cmd/drive/read_env.go
Outdated
RegPass string `env:"CUSTOM_ENV_CI_REGISTRY_PASSWORD"` | ||
JobImg string `env:"CUSTOM_ENV_CI_JOB_IMAGE"` | ||
JobImg string `env:"CUSTOM_ENV_CI_JOB_IMAGE"` | ||
DockerPass string `env:"CF_DOCKER_PASSWORD"` |
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.
[question] Do we need this? We set CF_DOCKER_PASSWORD
with the value of either DockerHubToken
or CIRegistryPass
, we don't read it in.
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.
Oh yeah, nice catch, thanks.
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.
🎉
This is what I get for my hubris
🎫 Addresses issue: https://github.com/GSA-TTS/devtools-program/issues/207
Centralized location to manage parsing environment variables for use by different job stages.
🛠 Summary of changes
run_env.go
&run_env_test.go
EnvCfg
's and various failure states. I'd like to work on them more but unless you, dear reviewer, think it's necessary to do now, I plan to leave it for later so these changes can get in and be built upon by others.