feat: Adds gzip compression level configuration to backups for v2#574
feat: Adds gzip compression level configuration to backups for v2#574
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for configuring server-side gzip compression level when downloading backup snapshots (v2), wiring a new CLI flag through the backup client and OpenAPI-generated client.
Changes:
- Add
--gzip-compression-levelCLI flag and plumb it into backup request parameters. - Send
Gzip-Compression-Levelheader on backup metadata and shard download requests when configured. - Update OpenAPI contract and regenerated models/clients (including InfluxQL response/model updates).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/influx/backup.go | Adds CLI flag to configure server-side gzip compression level. |
| clients/backup/backup.go | Passes configured gzip compression level into API requests. |
| api/contract/overrides/paths/backup_metadata.yml | Documents the new request header in the OpenAPI overrides. |
| api/api_backup.gen.go | Adds generated request field + header plumbing for Gzip-Compression-Level. |
| api/model_script_language.gen.go | Adds influxql as a supported ScriptLanguage value. |
| api/model_influxql_json_response*.gen.go | Improves InfluxQL response model docs and adds partial to results. |
| api/contract/openapi | Bumps OpenAPI submodule pointer for regenerated output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. If a property is not present, it is assumed to be `null`. | ||
| Series *[]InfluxqlJsonResponseSeries `json:"series,omitempty" yaml:"series,omitempty"` | ||
| // True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. | ||
| Partial *bool `json:"partial,omitempty" yaml:"partial,omitempty"` |
There was a problem hiding this comment.
Analysis of change here:
The main consumer is the v1 shell client (clients/v1_shell/v1_shell.go). It calls the legacy /query endpoint, deserializes the JSON into api.InfluxqlJsonResponse via json.Unmarshal(), then renders results. The schema change adds descriptions and a Partial boolean field, since json.Unmarshal ignores unknown/missing fields by default, existing code won't break from the addition.
2d848e7 to
ca9f999
Compare
davidby-influx
left a comment
There was a problem hiding this comment.
LGTM, but @gwossum should review as well.
|
@devanbenz This doesn't seem to work. I ran this branch of I captured the HTTP headers from It looks like influxdb is looking for a different header ( |
|
@devanbenz In 1.x, it looks like the TSM file compression is done on the backup client side, but in 2.x the TSM file compression is done on the server side. Is that correct? Assuming that's true, one thing to note is that the 2.x |
Sorry, it is very possible you need to be testing against my latest changes to influxdb: influxdata/influxdb#27297 which are not yet ready. |
No description provided.