Repository navigation
Refresh airflow_development automatically after merges to main - #315
Merged
Merged
Conversation
- airflow_dev.py: detect squash-merged branches as merged (refresh and status only checked commit ancestry, which never matches a squash merge), and emit GitHub warnings for branches removed by a conflicting rebuild - 30_ workflow: add orchestrate/ to the triggers, add a changes job so orchestrate-only pushes skip the dbt deployment, and add a job that runs airflow_dev.py refresh after the deployment - docs: describe the automatic refresh, what happens on conflicts, and the new limitations; update the diagram Co-Authored-By: Claude Opus 5.5 <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
Keeps
airflow_developmentin sync withmainautomatically, instead of relying on someone runningairflow_dev.py refreshby hand.orchestrate/utils/airflow_dev.pyrefreshandstatusonly checked whether a branch's commits were inmain's history, which never matches a squash merge, so merged branches were never dropped. The newis_merged()also treats a branch as merged when merging it intomainwould change nothing (git merge-tree). Checked against the currently deployedfeature/adf-example-dag(squash-merged in Add ADF pipeline example DAG and set sample DAGs to yearly schedules #313/Add ADF pipeline example DAG and set sample DAGs to yearly schedules … #314): the old check says not merged, the new one says merged..github/workflows/30_deploy_changes_to_production.ymlorchestrate/**to the push paths.changesjob: the dbtbuildjob only runs whentransform/,automate/or.github/workflows/changed (or on a manual run). Pushes that only changeorchestrate/skip the dbt deployment.refresh_airflow_developmentjob: runsairflow_dev.py refreshafterbuild, so it includes the version-bump commit. It also runs whenbuildis skipped or fails, becausemainhas moved either way. Usescontents: writeand a concurrency group so refreshes don't overlap.Docs
docs/airflow_development_branch.md: new "Keeping it up to date" and "When a refresh removes your branch" sections, and updated limitations.refreshcard now says it runs in CI after merges tomain.Before merging
airflow_developmentmust allow force pushes from GitHub Actions (GITHUB_TOKEN). If branch protection blocks it, the refresh job fails and the branch stays where it was.Behavior to be aware of
main(or with a branch deployed before it) is removed fromairflow_development; the job still succeeds and shows a warning.release/*branch are dropped fromairflow_developmentat the next refresh, before the release reachesmain. Workaround:add release/<name>.Test plan
is_merged()tested on a throwaway repo (squash-merged branch detected, unmerged branch not) and on the deployedfeature/adf-example-dagmainafter this: confirm the refresh job runs andairflow_dev.py statusshowsairflow_developmenton the latestmain🤖 Generated with Claude Code