Skip to content

Add migration package for gating runnables behind pre-start migrations - #493

Merged
afritzler merged 1 commit into
ironcore-dev:mainfrom
afritzler:enh/migration
Aug 28, 2026
Merged

Add migration package for gating runnables behind pre-start migrations#493
afritzler merged 1 commit into
ironcore-dev:mainfrom
afritzler:enh/migration

Conversation

@afritzler

@afritzler afritzler commented Aug 28, 2026

Copy link
Copy Markdown
Member

Proposed Changes

Add migration package for gating runnables behind pre-start migrations.

Summary by CodeRabbit

  • New Features

    • Added migration support that runs registered migrations before application components start.
    • Migrations run concurrently, with completion and errors reported through the migration lifecycle.
    • Application components are prevented from starting if a migration fails.
    • Components exit cleanly when startup is canceled.
  • Tests

    • Added coverage for migration execution, concurrency, failures, lifecycle behavior, and startup gating.

Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
@afritzler
afritzler requested review from a team as code owners August 28, 2026 06:42
@github-actions github-actions Bot added the enhancement New feature or request label Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 55539517-48af-4c31-805f-f4fabaf9f141

📥 Commits

Reviewing files that changed from the base of the PR and between b20b6b1 and 6506cc0.

📒 Files selected for processing (2)
  • migration/migration.go
  • migration/migration_test.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Migration gating

Layer / File(s) Summary
Migrator lifecycle
migration/migration.go, migration/migration_test.go
Adds migration registration, concurrent execution, completion signaling, error aggregation, lifecycle validation, and tests for these behaviors.
Manager runnable gating
migration/migration.go, migration/migration_test.go
Adds WrapManager, which delays runnable startup until migrations finish and handles migration errors and context cancellation. Tests cover each outcome.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 6506c

This change gates manager runnables on concurrent startup migrations, but cancellation, partial migration failure, and startup ordering are not fully defined. A canceled migration could block services indefinitely or allow startup after incomplete work, while concurrent failures could leave partial state; these issues should be explicitly addressed or accepted before merging.

Suggested reviewers: adracus

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the new migration package and its purpose of gating runnables behind pre-start migrations.
Description check ✅ Passed The description clearly states the main proposed change. It omits the template's Fixes # section and two placeholder entries, but the core change is sufficiently documented.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@afritzler
afritzler enabled auto-merge (squash) August 28, 2026 06:48
@afritzler
afritzler requested a review from adracus August 28, 2026 07:04
@afritzler
afritzler merged commit 4317a72 into ironcore-dev:main Aug 28, 2026
7 checks passed
@hardikdr hardikdr added the area/iaas Issues related to IronCore IaaS development. label Aug 28, 2026
@hardikdr hardikdr added this to Roadmap Aug 28, 2026
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/iaas Issues related to IronCore IaaS development. enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants