Skip to content

fix: add missing scope validation in Session.wait_for_schema_agreement#917

Merged
dkropachev merged 1 commit into
masterfrom
fix/schema-agreement-scope-validation
Jun 30, 2026
Merged

fix: add missing scope validation in Session.wait_for_schema_agreement#917
dkropachev merged 1 commit into
masterfrom
fix/schema-agreement-scope-validation

Conversation

@mykaul

@mykaul mykaul commented Jun 29, 2026

Copy link
Copy Markdown

The docstring and test for Session.wait_for_schema_agreement promised that passing an invalid scope (e.g. 'planet') would raise ValueError, but the validation was never implemented in the method body.

Add an explicit check against the three SchemaAgreementScope members (RACK, DC, CLUSTER).

uv run pytest tests/unit/test_cluster.py::SessionTest::test_wait_for_schema_agreement_rejects_unknown_scope
Pytest: 1 passed

Introduced in commit 0d215f45bcluster: add Session.wait_for_schema_agreement (Dmitry Kropachev, 8 weeks ago). The test was never caught because unit tests are not run in CI.

The docstring and test promised ValueError for invalid scope values
(e.g. 'planet'), but the validation was never implemented in the method
body.  Add an explicit check against the three SchemaAgreementScope
members.

Introduced in commit 0d215f4 (cluster: add Session.wait_for_schema_agreement).
@mykaul mykaul requested a review from dkropachev June 29, 2026 20:34
@mykaul

mykaul commented Jun 29, 2026

Copy link
Copy Markdown
Author

Aren't unit tests running in CI?

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Lorak-mmk

Copy link
Copy Markdown

Aren't unit tests running in CI?

#904

And fix: #911

@dkropachev dkropachev merged commit 03c4c96 into master Jun 30, 2026
27 of 28 checks passed
@dkropachev dkropachev deleted the fix/schema-agreement-scope-validation branch June 30, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants