fix(cassandra): publish required service schemas - #439
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughAdds Cassandra keyspace, role, UDT, table, index, lock, and liveness migrations for ChangesCassandra schema publication
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
🌿 Preview your docs: https://nvidia-preview-fix-publish-cassandra-schemas.docs.buildwithfern.com/nvcf |
004e3fb to
f8f6fe1
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@migrations/cassandra/keyspaces/nvcf_autoscaler/02_init_roles.up.sql`:
- Around line 7-8: Replace the direct system_auth role_members INSERT and
roles.member_of UPDATE in
migrations/cassandra/keyspaces/nvcf_autoscaler/02_init_roles.up.sql and
migrations/cassandra/keyspaces/nvct_api/02_init_roles.up.sql with Cassandra’s
supported GRANT role-membership statement, granting each application access role
to its corresponding application role.
In `@migrations/cassandra/keyspaces/nvcf_autoscaler/03_init_tables.up.sql`:
- Around line 1-3: Resolve the schema/design inconsistency by either restoring
the archived columns in
migrations/cassandra/keyspaces/nvcf_autoscaler/03_init_tables.up.sql#L1-L3 or
documenting the approved account_id/nca_id replacement and migration impact.
Update
docs/superpowers/specs/2026-07-24-publish-cassandra-schemas-design.md#L37-L41 to
replace the “only expression changes” claim, and revise `#L48-L49` so verification
explicitly covers the approved schema differences.
In `@migrations/cassandra/keyspaces/nvct_api/03_init_tables.up.sql`:
- Around line 1-2: Update the provenance comment’s version reference for the
nvct_api schema from v1.2.4 to v1.5.2, keeping the existing source path and
canonical-schema wording unchanged.
In `@migrations/cassandra/tests/test-execute-sqls.sh`:
- Around line 19-24: Validate that schema_inventory produced by the README
parsing command is non-empty before entering the keyspace_name loop. If no
schema names were parsed, exit with a failure status and a clear diagnostic;
otherwise preserve the existing loop behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 408041be-40e2-4d78-93dc-8aa481992b34
📒 Files selected for processing (8)
docs/superpowers/specs/2026-07-24-publish-cassandra-schemas-design.mdmigrations/cassandra/keyspaces/nvcf_autoscaler/01_init_keyspace.up.sqlmigrations/cassandra/keyspaces/nvcf_autoscaler/02_init_roles.up.sqlmigrations/cassandra/keyspaces/nvcf_autoscaler/03_init_tables.up.sqlmigrations/cassandra/keyspaces/nvct_api/01_init_keyspace.up.sqlmigrations/cassandra/keyspaces/nvct_api/02_init_roles.up.sqlmigrations/cassandra/keyspaces/nvct_api/03_init_tables.up.sqlmigrations/cassandra/tests/test-execute-sqls.sh
Add the nvct_api and nvcf_autoscaler migrations to the GitHub build source and require every documented schema inventory entry to include its three baseline migration files. Fixes #438 Signed-off-by: Stephanie Baum <sbaum@nvidia.com>
f8f6fe1 to
5ae2239
Compare
|
🎉 This PR is included in version nvcf-cassandra-migrations-v0.14.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
TL;DR
Publish the
nvct_apiandnvcf_autoscalerCassandra schemas so fresh self-managed installations create every documented keyspace. Add an inventory regression test so a schema listed in the migration README cannot be omitted from future images.Additional Details
Why
The GitHub migration source listed both keyspaces in its schema inventory but did not contain their migration directories. The migration job could therefore complete successfully while required service keyspaces were absent.
What changed
nvct_api.nvcf_autoscaler.${REPLICA_COUNT}substitution supported by the current migration entrypoint.01_init_keyspace.up.sql,02_init_roles.up.sql, and03_init_tables.up.sql.Customer Release Notes
Fresh self-managed installations now create the Cassandra schemas required by the task and function autoscaler services.
Plan Summary
The migration image gains two keyspaces, their application roles, and their canonical tables and types. Existing migration discovery applies the files without deployment wiring changes.
Usage
No operator action is required beyond using an image containing this change for a fresh installation.
Testing
sh migrations/cassandra/tests/test-execute-sqls.shsh -n migrations/cassandra/tests/test-execute-sqls.shshellcheck migrations/cassandra/tests/test-execute-sqls.shgit diff --check origin/main...HEADQA is recommended on a fresh supported Cassandra deployment to confirm all seven documented keyspaces are created. No local cluster was mutated during validation.
Notes
The inventory check is README-driven so the documented schema source list remains the publication contract.
References
Related Pull Requests
None.
Dependencies
None. No license review or NOTICE update is required.
For the Reviewer
Please focus on the schema fidelity and the README-driven inventory check in
migrations/cassandra/tests/test-execute-sqls.sh.For QA
Run the migration image against a fresh supported Cassandra deployment and confirm all keyspaces listed in
migrations/cassandra/keyspaces/README.mdare present.Issues
Fixes #438
Checklist
Summary by CodeRabbit