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): bucket create to accept org name as flag #16187

Merged
merged 3 commits into from
Dec 10, 2019

Conversation

dearyhud
Copy link
Contributor

@dearyhud dearyhud commented Dec 10, 2019

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

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

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.

it will be nice to have some tests, but we can make another pr

@jsteenb2
Copy link
Contributor

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.
- 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
@@ -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.")
Copy link
Contributor Author

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

@dearyhud dearyhud merged commit 336961c into master Dec 10, 2019
@dearyhud dearyhud deleted the 15828/bucket-create branch December 10, 2019 23:46
if err != nil {
return fmt.Errorf("invalid org ID provided: %s", err.Error())
if b.orgID != "" {
var err error
Copy link
Contributor

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...

Copy link
Contributor

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

Copy link
Contributor

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.

@dearyhud dearyhud mentioned this pull request Dec 11, 2019
4 tasks
alexpaxton pushed a commit that referenced this pull request Jan 9, 2020
* enables the user to specify an organization name when creating a bucket.
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.

influx bucket create cannot use organization name
4 participants