Skip to content

feat(sis): Adding deployment_id and gpu_spec_id and index for them to instances table - #602

Merged
dmikhaylovnv merged 1 commit into
mainfrom
fix/sis_add_columns
Aug 4, 2026
Merged

feat(sis): Adding deployment_id and gpu_spec_id and index for them to instances table#602
dmikhaylovnv merged 1 commit into
mainfrom
fix/sis_add_columns

Conversation

@dmikhaylovnv

@dmikhaylovnv dmikhaylovnv commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Adding deployment_id and gpu_spec_id and their indexes for them to instances table

Issues

Resolves NVIDIA/nvcf#11152

Summary by CodeRabbit

  • New Features
    • Instances can now be associated with a deployment and GPU specification.
    • Added database indexes to improve lookup performance for these associations.

@dmikhaylovnv
dmikhaylovnv requested a review from a team as a code owner July 31, 2026 18:51
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d4097be6-f932-41e7-b80f-0a110eb2bace

📥 Commits

Reviewing files that changed from the base of the PR and between a0e1891 and a9e1c87.

📒 Files selected for processing (2)
  • migrations/cassandra/keyspaces/sis_api/07_add_deployment_and_gpu_spec_id.up.sql
  • migrations/cassandra/keyspaces/sis_api/08_add_indexes_for_deployment_and_gpu_spec_id.up.sql
🚧 Files skipped from review as they are similar to previous changes (2)
  • migrations/cassandra/keyspaces/sis_api/08_add_indexes_for_deployment_and_gpu_spec_id.up.sql
  • migrations/cassandra/keyspaces/sis_api/07_add_deployment_and_gpu_spec_id.up.sql

📝 Walkthrough

Walkthrough

The Cassandra schema adds deployment_id and gpu_specification_id UUID columns to sis_api.instances. It also adds idempotent custom indexes for both columns.

Changes

Instance lookup schema

Layer / File(s) Summary
Instance columns and indexes
migrations/cassandra/keyspaces/sis_api/07_add_deployment_and_gpu_spec_id.up.sql, migrations/cassandra/keyspaces/sis_api/08_add_indexes_for_deployment_and_gpu_spec_id.up.sql
Adds UUID columns to sis_api.instances and creates custom indexes for deployment and GPU specification lookups.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: sbaum1994, nvjmcnamee

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required feat(sis): format and accurately describes the new instance columns and indexes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sis_add_columns

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/sis_api/07_add_deployment_and_gpu_spec_id.up.sql`:
- Line 2: Extend migrations/cassandra/tests/test-execute-sqls.sh to cover
migrations 07 and 08: verify both UUID columns, both indexes, migration
ordering, and successful repeat application; the migration SQL files require no
direct changes. If coverage is intentionally omitted, document the reason in the
Pull Request description.
🪄 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: 82eab019-e4ef-4424-b25f-8a2d7e6adcc1

📥 Commits

Reviewing files that changed from the base of the PR and between 399964b and e394713.

📒 Files selected for processing (2)
  • migrations/cassandra/keyspaces/sis_api/07_add_deployment_and_gpu_spec_id.up.sql
  • migrations/cassandra/keyspaces/sis_api/08_add_indexes_for_deployment_and_gpu_spec_id.up.sql

@sanjay-saxena sanjay-saxena left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dmikhaylovnv -- Is there a reason why we need separate sql files for these DDLs that are related to the same columns?

@sanjay-saxena
sanjay-saxena requested a review from harshm98 August 2, 2026 05:43
@dmikhaylovnv

Copy link
Copy Markdown
Contributor Author

@dmikhaylovnv -- Is there a reason why we need separate sql files for these DDLs that are related to the same columns?

I'm following the same approach we have in helenus. My gut feeling is the order of commands in a single file is not guaranteed in some cases while files order is always guaranteed. We need to make sure the columns are created before we add indexes.

@sanjay-saxena sanjay-saxena left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@dmikhaylovnv

Copy link
Copy Markdown
Contributor Author

/rebase

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@dmikhaylovnv
dmikhaylovnv added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit efc98c7 Aug 4, 2026
16 checks passed
@dmikhaylovnv
dmikhaylovnv deleted the fix/sis_add_columns branch August 4, 2026 23:55
@balajinvda

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version nvcf-cassandra-migrations-v0.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants