Skip to content

fix(cassandra): restore published autoscaler compatibility - #1597

Open
sbaum1994 wants to merge 1 commit into
mainfrom
fix/cassandra-autoscaler-published-compat
Open

fix(cassandra): restore published autoscaler compatibility#1597
sbaum1994 wants to merge 1 commit into
mainfrom
fix/cassandra-autoscaler-published-compat

Conversation

@sbaum1994

@sbaum1994 sbaum1994 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Why

Cassandra migrations 0.17.2 removed three autoscaler tables that are still queried by the latest published function-autoscaler image. That prevents the self-managed stack from taking the current NVCT schema without breaking autoscaler behavior.

What changed

Adds an idempotent migration that restores the three published-autoscaler tables and extends the migration regression test to require them.

Customer Release Notes

Preserves function autoscaler compatibility when upgrading the self-managed Cassandra schema.

Plan Summary

Restores three Cassandra tables. Existing rows are unaffected.

Usage

Upgrade function autoscaler to chart 0.3.0 and image 1.21.0 before applying the new migration release.

Testing

  • migrations/cassandra/tests/test-execute-sqls.sh
  • arm64 Cassandra migration image build
  • Live observability-all autoscaler deployment and invocation with the candidate migration image

No additional QA is required beyond CI.

Notes

Publish migrations 0.17.3 after merge, then advance the source-chart and stack pins.

References

Related Pull Requests

Dependencies

None. No license or NOTICE changes.

Summary by CodeRabbit

  • New Features

    • Added autoscaler data tables for tracking invocation history, currently running functions without invocations, and related history.
    • Historical records retain prediction and worker details for up to two days; current-state records expire after ten minutes.
  • Tests

    • Added migration validation to confirm the autoscaler tables can be recreated safely and consistently.

Migrations 0.17.2 removed three tables that are still required by the latest published function-autoscaler image. Recreate them idempotently so the current self-managed stack can consume the NVCT schema update without breaking scale-from-zero.

Fixes #1592

Signed-off-by: Stephanie Baum <sbaum@nvidia.com>
@sbaum1994
sbaum1994 requested a review from a team as a code owner September 5, 2026 05:29
@sbaum1994
sbaum1994 requested a review from apartha-nv September 5, 2026 05:29
@coderabbitai

coderabbitai Bot commented Sep 5, 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: e6731a61-1d42-4fff-ac19-e46cd53695bd

📥 Commits

Reviewing files that changed from the base of the PR and between bfe89dd and 9ad4f54.

📒 Files selected for processing (2)
  • migrations/cassandra/keyspaces/nvcf_autoscaler/05_restore_published_autoscaler_tables.up.sql
  • migrations/cassandra/tests/test-execute-sqls.sh

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The migration restores three autoscaler Cassandra tables for current state and history. It applies TTL, compaction, clustering, and read-repair settings. The migration test verifies idempotent creation for each table.

Changes

Autoscaler schema restoration

Layer / File(s) Summary
Autoscaler table definitions
migrations/cassandra/keyspaces/nvcf_autoscaler/05_restore_published_autoscaler_tables.up.sql
Adds invocation-history and running-function tables with composite keys, timestamp clustering, TTLs, unified compaction, and disabled read repair.
Migration validation
migrations/cassandra/tests/test-execute-sqls.sh
Checks that the migration uses CREATE TABLE IF NOT EXISTS for all three required tables.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9ad4f

This restores the autoscaler tables required by the published image during Cassandra upgrades, preventing scale-from-zero discovery failures. The migration is idempotent and includes regression coverage, with no current merge-blocking risk identified.

🚥 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 Conventional Commits format and accurately describes the compatibility fix.
Linked Issues check ✅ Passed The migration restores the three autoscaler tables required for compatibility with the published image and adds an idempotence regression test [#1592].
Out of Scope Changes check ✅ Passed All changes are limited to the Cassandra compatibility migration and its regression test. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cassandra-autoscaler-published-compat

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

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.

fix(function-autoscaler): publish a Cassandra 0.17.2-compatible image

1 participant