Skip to content

Conversation

@andrwng
Copy link
Contributor

@andrwng andrwng commented Feb 18, 2025

Cluster properties that don't get restored during cluster restore were
previously managed in a static list in the cluster restore reconciler.
This made it easy to miss when adding new properties.

As a step towards making this list more future proof, this commit adds a
gets_restored flag to property metadata, and updates the reconciler to
generate its list dynamically based on the cluster's current properties.

The generated list is identical to the one previously defined in the
reconciler.

There are no major functional changes in this PR.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

  • none

I intend on adding a test and would prefer it being a GTest.
Cluster properties that _don't_ get restored during cluster restore were
previously managed in a static list in the cluster restore reconciler.
This made it easy to miss when adding new properties.

As a step towards making this list more future proof, this commit adds a
gets_restored flag to property metadata, and updates the reconciler to
generate its list dynamically based on the cluster's current properties.

The generated list is identical to the one previously defined in the
reconciler.
@andrwng andrwng requested a review from a team as a code owner February 18, 2025 22:59
Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to have the aliases, but they aren't real configuration option names, so i'm not sure if that has any kind of downstream affect.

Comment on lines +34 to +35
for (const auto& alias : prop.aliases()) {
ignore_list.emplace(alias);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will aliases matter or would aliases cause problems? afaik they aren't actually strings that are ever serialized to disk/wire, and they only exist as strings in the binary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea good question. I added aliases because aliasing is one way we implement renames of properties. Since the restored controller snapshots may exist from older versions of Redpanda, for such properties, there's no guarantee that the snapshotted names will be identical to the used in the latest version of Redpanda.

@vbotbuildovich
Copy link
Collaborator

CI test results

test results on build#61981
test_id test_kind job_url test_status passed
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/61981#01951b4b-8895-458e-9960-a7ef31e6fe5d FLAKY 1/2
kafka_server_rpfixture.kafka_server_rpfixture unit https://buildkite.com/redpanda/redpanda/builds/61981#01951b4b-8895-458e-9960-a7ef31e6fe5d FLAKY 1/2
rptest.tests.compaction_recovery_test.CompactionRecoveryUpgradeTest.test_index_recovery_after_upgrade ducktape https://buildkite.com/redpanda/redpanda/builds/61981#01951ba8-6f87-412a-ac90-13794228fa3b FLAKY 1/2
rptest.tests.log_compaction_test.LogCompactionTest.compaction_stress_test.cleanup_policy=compact.key_set_cardinality=1000.storage_compaction_key_map_memory_kb=3 ducktape https://buildkite.com/redpanda/redpanda/builds/61981#01951ba8-6f8a-45c2-857f-28daa29569fc FLAKY 1/3

@andrwng andrwng merged commit 591c90d into redpanda-data:dev Feb 19, 2025
18 checks passed
JakeSCahill added a commit to redpanda-data/docs-extensions-and-macros that referenced this pull request Apr 28, 2025
JakeSCahill added a commit to redpanda-data/docs-extensions-and-macros that referenced this pull request May 2, 2025
…ve access to a consistent set of tools (#99)

* Add a doc-tools CLI command so that writers and our tests have access to a consistent set of tools

* Bump version

* Add submodule

* Add tree-sitter-cpp submodule

* Add tree-sitter-c grammar as dependency of C++ parser

* Add tree-sitter-c grammar as required by tree-sitter-cpp

* Add property automation to CLI

* Add CLI help

* doc-tools CLI

* Remove tree‑sitter‑cpp submodule; clone on demand instead

* Fix paths

* Fix makefile

* Update package.json

* Update package-lock.json

* Fix packages

* Cleanup

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Refactor

* Add Iceberg support in test cluster

* Fix error

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Final fixes

* Apply suggestions

* Add support for the new gets_restored metadata introduced in redpanda-data/redpanda#25105

* Add fetch command for saving files from other repos locally

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add support for a --diff flag

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
JakeSCahill added a commit to redpanda-data/docs-extensions-and-macros that referenced this pull request May 6, 2025
* Add a doc-tools CLI command so that writers and our tests have access to a consistent set of tools

* Bump version

* Add submodule

* Add tree-sitter-cpp submodule

* Add tree-sitter-c grammar as dependency of C++ parser

* Add tree-sitter-c grammar as required by tree-sitter-cpp

* Add property automation to CLI

* Add CLI help

* doc-tools CLI

* Remove tree‑sitter‑cpp submodule; clone on demand instead

* Fix paths

* Fix makefile

* Update package.json

* Update package-lock.json

* Fix packages

* Cleanup

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Refactor

* Add Iceberg support in test cluster

* Fix error

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Final fixes

* Apply suggestions

* Add support for the new gets_restored metadata introduced in redpanda-data/redpanda#25105

* Add fetch command for saving files from other repos locally

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add support for a --diff flag

* Use tags for Redpanda labs

* Add symlink util for labs to the CLI

* Remove utils

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants