hotfix(airflow): fix cleanup DAG connection + add ensure script#1297
Merged
Conversation
The daily_cleanup_pipeline DAG failed on every run for 6+ cycles because: 1. The 'cleanup' HTTP connection did not exist (never created on init) 2. The existing connections used 'host.docker.internal' as host, but maple-airflow-* containers use network_mode: host where that DNS entry does not resolve (bridge-only) Symptom: HttpSensor returned HTTP 000, task marked failed, all 3 cleanup tasks went upstream_failed, DAG marked failed silently. disk filled 60GB→265GB in 19h with no cleanup. Verified fix 2026-06-17: - Connection 'cleanup' set with host=localhost:8084 - HttpSensor pokes now return HTTP 200 - Triggered DAG ran 3 cleanup tasks, recovered 184GB from MinIO bucket - Pipeline-test SKILL.md corrected: all 3 connections use 'localhost' - New script: scripts/airflow-ensure-connections.sh Idempotent restore after container recreate / db reset Usage: scripts/airflow-ensure-connections.sh [--verify] Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
zbnerd
added a commit
that referenced
this pull request
Jun 17, 2026
Hotfix already deployed to master (#1297). Sync develop so next release branch picks it up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Fix
daily_cleanup_pipelineDAG that has been failing for 6+ cycles (since 2026-06-15 12:00 UTC) because:cleanupAirflow HTTP connection was never created at scheduler inithost.docker.internalas host, which does not resolve innetwork_mode: hostcontainers (maple-airflow-* uses host network)Why
Without working cleanup, MinIO bucket grew 60GB → 265GB in 19h. Pipeline writing ~10GB/run, 4-6 runs/day, no retention enforcement. Cleanup module works correctly when called directly via HTTP POST — the failure is purely in the Airflow → cleanup trigger path.
Changes
scripts/airflow-ensure-connections.sh(new): idempotently restores 3 Airflow HTTP connections (external_api,calculator,cleanup) withlocalhosthost. Use--verifyfor health check, no args to create. Exit codes distinguish missing-container from missing-connection..claude/skills/pipeline-test/SKILL.md: corrected connection hosthost.docker.internal→localhostfor all 3, addedcleanupconnection that was previously missing. Documented why (host network mode).Test plan
airflow connections get cleanupshowslocalhost:8084✓airflow dags trigger daily_cleanup_pipelineran end-to-end ✓curl localhost:8084/actuator/healthfrom scheduler = 200 ✓Post-merge
After merging to master, sync to develop via
git checkout develop && git merge master --no-ff. The hotfix doesn't touch any code path that diverged on develop.🤖 Generated with Claude Code