feat: influx CLI Packager support for explicit schema buckets #21465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR teaches the
influx
CLI how to export and apply buckets with explicit schema from Cloud 2. The existing CLI subcommands toexport
andapply
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):influxdb/cmd/influx/template.go
Lines 1358 to 1362 in 00afd95
Following the precedent set by Dashboards, the following UI will be shown when applying changes to a bucket that include schema updates: