feat(clickhouse): model the new version attribute - #54
Merged
Merged
Conversation
The Cozystack API at v1.6.3 adds `version` to the ClickHouse ConfigSpec, an enum of v25.8, v25.3 and v24.9 that selects the image for both the server and Keeper. Until it is modelled a ClickHouse major cannot be pinned from Terraform, and the spec-coverage guard fails against the bumped module. It departs from the defaulted shape of the other versioned kinds because here the server default is the oldest release in the enum. An update replaces the whole spec, so a default would plan a downgrade for every upgraded instance whose configuration drops the line. An unset version now keeps the running one, and a server that predates the field never receives an empty value. The description warns that only raising the value is safe: an older server cannot read data written by a newer one and Keeper snapshots are not backward compatible. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
IvanHunters
approved these changes
Sep 21, 2026
This was referenced Sep 21, 2026
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.
Pull Request
Summary
Cozystack API v1.6.3 lets a ClickHouse instance pick its server version. This bumps the API module and adds a
versionattribute to thecozystack_clickhouseresource and data source.Changes
bootstrap.newServerNameon PostgreSQL, inside a block the provider already leaves unmanaged.versionattribute on ClickHouse with the valuesv25.8,v25.3andv24.9. It sets the image for both the server and Keeper, and a value outside the upstream enum fails at plan time.versionon the other kinds. On ClickHouse the server defaultv24.9is the oldest release in the enum. An update replaces the whole spec, so a default would plan a downgrade for any upgraded instance whose config drops the line. Left unset, a new instance gets the platform default, and removing the attribute later keeps the running version.Testing
make test)make lint)make docsproduces no diff)make testacc), if applicableDocumentation
examples/(if a resource/data source changed)make docs)Checklist
type(scope): description)Additional Notes
An explicit downgrade is still accepted. Upstream calls it unsafe, because an older server cannot read data written by a newer one and Keeper snapshots are not backward compatible. It does not reject one either, so here the attribute description is the only warning. OpenSearch has the same deleted-line exposure and is tracked in #49.
After the first apply that changes an instance, the running version is written into the spec, so an instance without
versionstops following later changes to the platform default.Acceptance tests were not run against a live cluster. The unit tests replay the framework's plan order for three cases: create without
version, a removedversionline after an upgrade, and an explicit older value.No breaking changes.