Preserve Kafka setting during ClickPipe updates - #418
Open
sdairs wants to merge 1 commit into
Open
Conversation
| .get_clickpipe_settings(&org_id, service_id, clickpipe_id) | ||
| .await? | ||
| .kafka_read_committed | ||
| .ok_or("the API response is missing kafka_read_committed")?; |
There was a problem hiding this comment.
🟠 High cloud/clickpipes.rs:1648
Valid non-Kafka ClickPipes settings updates now fail before the PUT when the GET response omits kafka_read_committed, so changes such as object_storage_concurrency or object_storage_polling_interval_ms are never applied. Since this Kafka-specific field is optional, preserve it when present and use the existing false default when it is absent instead of returning an error.
Suggested change
| .ok_or("the API response is missing kafka_read_committed")?; | |
| .unwrap_or(false); |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @crates/clickhousectl/src/cloud/clickpipes.rs around line 1648:
Valid non-Kafka ClickPipes settings updates now fail before the `PUT` when the GET response omits `kafka_read_committed`, so changes such as `object_storage_concurrency` or `object_storage_polling_interval_ms` are never applied. Since this Kafka-specific field is optional, preserve it when present and use the existing `false` default when it is absent instead of returning an error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
kafka_read_committedvalue when updating unrelated ClickPipe settingsGETtoPUTrequest flowVerification
cargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warningscargo fmt --all --check