Fix Airflow migration-job race in CI deploys - #40
Merged
Conversation
The migrateDatabaseJob/createUserJob TTL (300s) was shorter than the helm_release wait window (timeout = 900s). Under image-pull contention the migration job finishes early, then Helm keeps waiting on the slower webserver/scheduler pods. At the 300s mark the completed migration job is TTL-reaped, so Helm's final wait_for_jobs status check finds it gone and fails the release with: jobs.batch "airflow-run-airflow-migrations" not found Raise ttlSecondsAfterFinished to 1800s (> the 900s helm timeout) on both helper jobs so they survive the entire wait window and are still cleaned up afterwards. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
klagrida
force-pushed
the
fix/airflow-migration-job-race
branch
from
June 6, 2026 10:38
cd75884 to
221cfb1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
E2E intermittently fails at the Deploy step with:
The images pull fine and the migration itself succeeds — this is not a timeout. It's a TTL/wait race:
migrateDatabaseJob/createUserJobhadttlSecondsAfterFinished: 300(5 min).helm_release.airflowwaits withtimeout = 900(15 min) andwait_for_jobs = true.wait_for_jobsstatus check finds it gone and marks the whole release failed.Fix
Raise
ttlSecondsAfterFinishedto1800(> the 900s helm timeout) on both helper jobs, so they survive the entire wait window and are still cleaned up afterwards.wait_for_jobs = trueis preserved, so we still gate on migration success — we just stop the job from vanishing mid-wait.Validation
The goal of this PR is to let CI (E2E + Cluster Integration) exercise the fix and confirm the flake is gone.
Note on stacking
Branched from
ci/bump-actions-node24(PR #37), so the diff also contains that PR's Node-24 action bumps. If #37 merges first, this narrows to just the one-line TTL change. Base ismainbecause the workflows only trigger on PRs targetingmain.🤖 Generated with Claude Code