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

feat(cmd): flags override env vars #16280

Closed
wants to merge 4 commits into from
Closed

Conversation

dearyhud
Copy link
Contributor

@dearyhud dearyhud commented Dec 18, 2019

Closes #16246

@@ -23,31 +22,20 @@ or execute a literal Flux query contained in a file by specifying the file prefi
}

var queryFlags struct {
OrgID string
Org string
organization
Copy link
Contributor

@imogenkinsman imogenkinsman Dec 19, 2019

Choose a reason for hiding this comment

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

I'm not wild about this (and some of the supporting methods); it's a bit harder to understand and feels like it's a separation of concerns violation (CLI and service logic starting to bleed into the organization struct).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fair point, I tried to tread really lightly when I added this but crossed over boundaries a little. on the flip, this does DRY up a lot of cobra stuff across the board, and organization lookups by name all go through one code path here. I'm open to suggestions on where to put this as well

Copy link
Contributor

@kelwang kelwang Dec 26, 2019

Choose a reason for hiding this comment

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

I agree it's a little hard to understand at beginning. But overall, it would help us to make all of our flags more consistent. So still worth it in my opinion. Ideally, CLI should inherent all the behavior of the API, plus some interactive features and file parsing.

@dearyhud dearyhud force-pushed the 16246/cli-flag-override branch from 6fb1b5b to ebfcd6e Compare December 19, 2019 23:40
@dearyhud dearyhud marked this pull request as ready for review December 19, 2019 23:40
@dearyhud dearyhud requested a review from a team December 19, 2019 23:40
@dearyhud dearyhud force-pushed the 16246/cli-flag-override branch from 1db0a54 to d776e17 Compare December 20, 2019 18:47
@dearyhud dearyhud force-pushed the 16246/cli-flag-override branch from d776e17 to 9fd0222 Compare December 20, 2019 20:10
Copy link
Contributor

@kelwang kelwang left a comment

Choose a reason for hiding this comment

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

LGTM, maybe clarify the org embedding thing with @jademcgough before you merge it.

@russorat
Copy link
Contributor

russorat commented Feb 7, 2020

@jademcgough let's figure out what to do with this PR.

@jsteenb2
Copy link
Contributor

jsteenb2 commented Feb 7, 2020

this was remedied remedied here: #16491

closing this issue as its completed now

@jsteenb2 jsteenb2 closed this Feb 7, 2020
@jacobmarble jacobmarble deleted the 16246/cli-flag-override branch January 2, 2024 22:02
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.

cli flags should override environmental variables
5 participants