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: Add explicit schema bucket APIs #34

Merged
merged 2 commits into from
May 3, 2021
Merged

Conversation

stuartcarnie
Copy link
Contributor

This PR introduces Cloud 2 specific APIs for managing explicit schema buckets. Most of the changes are in the cloud
source tree, as the feature is Cloud 2 only.

The Bucket type adds a schemaType property.

  • For OSS it is expected to return implicit.
  • For Cloud 2 it can be either implicit or explicit, once the feature is available.

@stuartcarnie
Copy link
Contributor Author

stuartcarnie commented Apr 27, 2021

@danxmoran / @glinton this is a Cloud 2 only feature at this point. It is possible we could move this to OSS at some later point. My question for you is

How would I extend the CLI tools to be able to support this Cloud 2.0 feature?

It would include

  • modifying the bucket create command to allow specifying a schema-type of either implicit (default) or explicit
  • modifying the bucket list command to show the schemaType property
  • adding new commands to list, create and update existing measurement schemas for an explicit schema bucket

@danatinflux
Copy link

@stuartcarnie I'm pretty sure I wasn't the intended target? Boy, at least I hope so. :)

@stuartcarnie
Copy link
Contributor Author

@stuartcarnie I'm pretty sure I wasn't the intended target? Boy, at least I hope so. :)

Oi! Sorry Dan, I meant to tag @danxmoran

@danxmoran
Copy link
Contributor

@stuartcarnie I'd first merge your changes in this branch with the changes in #36, so you're up-to-date with the tweaks needed to make codegen work. After that, I'd add any of the paths+schemas you want the CLI to use into src/cli.yml.

Once you've committed the above, you can:

  1. Update the codegen script in influx-cli to point at it. In the short-term you'll want to work off of the dm-port-bucket-7 branch, but I'm hoping to merge it to main soon.
  2. Run make openapi to regenerate the client-side code using the new API docs
  3. Modify the existing bucket commands to take the new parameter
  4. Add new commands

You'll be the first not-me contributor in the new repo, so please let me know any feedback you have on the codegen flow / process of adding a new command in the new CLI codebase.

@stuartcarnie
Copy link
Contributor Author

Great info, thanks @danxmoran! I'll work through that today

@danxmoran
Copy link
Contributor

I made influxdata/influx-cli#51 to track the work over there

@stuartcarnie
Copy link
Contributor Author

Are you going to merge #36 today, so I can work of master or should I rebase on that branch?

@danxmoran
Copy link
Contributor

Just merged it, you should be set to work off of master

@stuartcarnie stuartcarnie force-pushed the sgc/issues/9672 branch 3 times, most recently from 0dd1aba to 331ea20 Compare April 28, 2021 06:32
This commit introduces Cloud 2 specific APIs for managing
explicit schema buckets. Most of the changes are in the `cloud`
only paths for managing measurement schema.

The Bucket type adds a `schemaType` property, that is expected to
return `implicit` for OSS 2.x and is not modifiable. For Cloud 2
it can be either `implicit` or `explicit`, once the feature is
available.
This allows a client to find a measurement schema within a bucket by
name.
@stuartcarnie stuartcarnie merged commit af4e3ef into master May 3, 2021
@stuartcarnie stuartcarnie deleted the sgc/issues/9672 branch May 3, 2021 21:55
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.

None yet

4 participants