-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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/influx): allow setting shard-group durations for buckets via API and CLI #20911
Conversation
904e57a
to
b7669f3
Compare
@@ -168,7 +161,7 @@ func (s *BucketClientService) UpdateBucket(ctx context.Context, id influxdb.ID, | |||
if err != nil { | |||
return nil, err | |||
} | |||
return br.toInfluxDB() | |||
return br.toInfluxDB(), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the PatchJSON call being called in the tests above? Especially for nil retention duration / shard group duration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in cmd/influxd/launcher/storage_test.go
. The BucketService
created here is a wrapper around the HTTP client. PatchJSON
is called as part of the update step in each test case. All of the existing cases only set retention duration XOR shard-group duration. I need to add a case that sets both. Case updating both values is added now.
}, | ||
} | ||
|
||
for _, tt := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lazily copy-pasted from testing/bucket_service.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This feels like more change than I would have expected for piping through a single API field (especially all the stuff in http_server_bucket), which worries me a little.
76ef185
to
eff0ad5
Compare
Closes #19764
Builds off of #20620 to address review feedback and ensure shard-group duration is tracked in metadata, so the CLI can report on it in all cases.