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: influx CLI Packager support for explicit schema buckets #21465

Merged
merged 1 commit into from
May 31, 2021

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented May 13, 2021

This PR teaches the influx CLI how to export and apply buckets with explicit schema from Cloud 2. The existing CLI subcommands to export and apply templates require a significant amount of logic be duplicated from the server to validate and parse the template prior to upload. Preferably, the template would be passed to the server for parsing and validation and an appropriate response sent to the client to display to the user. Changing this would require significant refactoring of the HTTP and CLI APIs, which is beyond the scope of this feature.

NOTES

The Packager CLI does not show diffs of hierarchical data, so it is unable to show detailed differences when new measurements are added or new columns to an existing measurement. An existing example of this is Dashboards, which are limited to showing only the number of charts (Num Charts column):

printer := diffPrinterGen("Dashboards", []string{"Description", "Num Charts"})
appendValues := func(id pkger.SafeID, metaName string, v pkger.DiffDashboardValues) []string {
return []string{metaName, id.String(), v.Name, v.Desc, strconv.Itoa(len(v.Charts))}
}

Following the precedent set by Dashboards, the following UI will be shown when applying changes to a bucket that include schema updates:

CleanShot 2021-05-19 at 16 17 15@2x

@stuartcarnie stuartcarnie self-assigned this May 13, 2021
@stuartcarnie stuartcarnie force-pushed the sgc/issues/9829 branch 7 times, most recently from 5b11cb9 to 33d5c49 Compare May 19, 2021 07:48
@stuartcarnie stuartcarnie marked this pull request as ready for review May 19, 2021 08:16
@stuartcarnie stuartcarnie requested a review from a team as a code owner May 19, 2021 08:16
@stuartcarnie stuartcarnie requested review from docmerlin and removed request for a team May 19, 2021 08:16
@stuartcarnie
Copy link
Contributor Author

Rebased due to conflicts

This commit adds the minimal requirements to process specs containing
explicit schema buckets, so they may be exported and applied from
Cloud 2.
@stuartcarnie
Copy link
Contributor Author

Rebased due to conflicts

@stuartcarnie stuartcarnie merged commit d165d76 into master May 31, 2021
@stuartcarnie stuartcarnie deleted the sgc/issues/9829 branch May 31, 2021 00:01
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.

2 participants