-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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): bucket create to accept org name as flag #16187
Conversation
025fc49
to
c28b945
Compare
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.
it will be nice to have some tests, but we can make another pr
c28b945
to
7e92c19
Compare
7e92c19
to
cf47291
Compare
can we add the tests in this body of work? a promise to come back and add tests in later, almost never comes to fruition. Be good to start delivering on our testing for cli stuff |
adds: - `--org` or -`o` shorthand for the organization name enables the user to specify an organization name when creating a bucket.
cf47291
to
0e4f056
Compare
- to ensure consistency across the cli the shorthand is being given to the shorthand was used for both flags inconsistently, but now it only works for
0e4f056
to
afa03e7
Compare
cmd/influx/inspect.go
Outdated
@@ -63,6 +63,7 @@ in the following ways: | |||
inspectReportTSMCommand.Flags().BoolVarP(&inspectReportTSMFlags.detailed, "detailed", "", false, "emit series cardinality segmented by measurements, tag keys and fields. Warning, may take a while.") | |||
|
|||
inspectReportTSMCommand.Flags().StringVarP(&inspectReportTSMFlags.orgID, "org-id", "", "", "process only data belonging to organization ID.") | |||
inspectReportTSMCommand.Flags().StringVarP(&inspectReportTSMFlags.orgID, "org", "o", "", "process only data belonging to organization ID.") |
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.
just caught this. will patch this up
bc158d5
to
09697c3
Compare
if err != nil { | ||
return fmt.Errorf("invalid org ID provided: %s", err.Error()) | ||
if b.orgID != "" { | ||
var err error |
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 isn't going to work, breaks the pattern for the builder...
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.
any SVC dep needs to be provided through DI not dumped in here globally
needs fixup
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.
Thanks for catching, we'll fix in the morning.
* enables the user to specify an organization name when creating a bucket.
enables a user to specify an organization name when creating a bucket from the influx cli.
Closes #15828
The influx bucket create command doesn't seem to have a -o flag for specifying the organization name. This PR adds a flag
--org
or-o
for specifying the org name to avoid the overhead of having to lookup an organization id