Table of contents
The main branch is for development of Airflow 3.x (next minor release). Airflow 3.1.x releases will be cut from v3-1-stable branch. Airflow 2.11.x releases will be cut from v2-11-stable branch.
The following section explains which branches you should target with your PR.
PRs should target the main branch. Make sure your changes are only related to Providers or the Helm chart. Avoid mixing core changes into the same PR.
If the PR is relevant to both Airflow 3.x and 3.1.x, it should target the main branch.
If you want to have a fix backported to 3.1.x please add (or request to add) “backport-to-v3-1-test” label to the PR. CI will automatically attempt to create a backport PR after merge.
When preparing a new 3.1.x release, the release manager will sync the v3-1-test branch to v3-1-stable and cut the release from the stable branch. PRs should never target v3-1-stable directly unless explicitly instructed by the release manager.
PRs should target main branch.
If a PR can be cleanly cherry-picked from main to v2-11-test, it should target the main branch and include the backport-to-v2-11-test label to automate the backport. If the PR cannot be cherry-picked without conflicts, you must manually create a PR targeting the v2-11-test branch.
[!IMPORTANT] Airflow 2.11 is intended as a bridge release for Airflow 3. As such, it is not expected to introduce new features beyond those relevant to the transition to Airflow 3. That said, we focus only critical security fixes in the maintenance period until end-of-life.
When preparing a new 2.11.x release, the release manager will sync the v2-11-test branch to v2-11-stable and cut the release from the stable branch. PRs should never target v2-11-stable directly unless explicitly instructed by the release manager.
The following sections explains the protocol for merging PRs.
Make sure PR targets main branch. Avoid merging PRs that involve (providers + core) or (helm chart + core). Core parts should be extracted to a separate PR. Exclusions should be pre-approved specifically with a comment by release manager. Do not treat PR approval (Green V) as exclusion approval.
The committer who merges the PR is responsible for backporting the PRs that are 3.1 bug fixes (generally speaking) to v3-1-test (latest active branch we release bugfixes from). See next chapter to see what kind of changes we cherry-pick.
It means that they should create a new PR where the original commit from main is cherry-picked and take care for resolving conflicts. If the cherry-pick is too complex, then ask the PR author / start your own PR against v3-1-test directly with the change. Note: tracking that the PRs merged as expected is the responsibility of committer who merged the PR.
Committer may also request from PR author to raise 2 PRs one against main branch and one against v3-1-test prior to accepting the code change.
Mistakes happen, and such backport PR work might fall through cracks. Therefore, if the committer thinks that certain PRs should be backported, they should set 3.1.x milestone for them.
This way release manager can verify (as usual) if all the “expected” PRs have been backported and cherry-pick remaining PRS.
We are using cherry-picker - a tool that has been developed by Python developers. It allows to easily cherry-pick PRs from one branch to another. It works both - via command line and via GitHub Actions interface.
v3-1-test branch?The v3-1-test latest branch is generally used to release bugfixes, but what we cherry-pick is a bit more nuanced than bugfixes only. We cherry-pick:
main branch and not in the latest release.no) and they should be always justified by explaining why this change is cherry-picked even if it is not a bug-fix.When you want to backport commit via GitHub actions (you need to be a committer), you should use “Backport commit” action. You need to know the commit hash of the commit you want to backport. You can pin the workflow from the list of workflows for easy access to it.
[!NOTE] It should be the commit hash of the commit in the
mainbranch, not in the original PR - you can find it viagit logor looking up main History.
Use main as source of the workflow and copy the commit hash and enter the target branch name (e.g. v2-11-test, v3-0-test).
The action should create a new PR with the cherry-picked commit and add a comment in the PR when it is successful (or when it fails). If automatic backporting fails because of conflicts, you have to revert to manual backporting using cherry-picker CLI.
cherry-picker CLIBackporting via CLI might be more convenient for some users. Also it is necessary if you want to backport PR that has conflicts. It also allows to backport commit to multiple branches in the same command.
To backport PRs to any branch (for example: v2-11-test), you can use the following command:
It's easiest to install it (and keep cherry-picker up-to-date) using uv tool:
uv tool install cherry-picker
And upgrade it with:
uv tool upgrade cherry-picker
Then, in order to backport a commit to a branch, you can use the following command:
cherry_picker COMMIT_SHA BRANCH_NAME1 [BRANCH_NAME2 ...]
This will create a new branch with the cherry-picked commit and open a PR against the target branch in your browser.
If the GH_AUTH environment variable is set in your command line, the cherry-picker automatically creates a new pull request when there are no conflicts. To set GH_AUTH, use the token from your GitHub repository.
To set GH_AUTH run this:
export GH_AUTH={token}
Sometimes it might result with conflict. In such case, you should manually resolve the conflicts. Some IDEs like IntelliJ has a fantastic conflict resolution tool - just follow Git -> Resolve conflicts menu after you get the conflict. But you can also resolve the conflicts manually; see How conflicts are are presented and How to resolve conflicts for more details.
cherry_picker --status # Should show if all conflicts are resolved cherry_picker --continue # Should continue cherry-picking process
[!WARNING] Sometimes, when you stop cherry-picking process in the middle, you might end up with your repo in a bad state and cherry-picker might print this message:
🐍 🍒 ⛏
You're not inside a cpython repo right now! 🙅
You should then run
cherry-picker --abortto clean up the mess and start over. If that does not work you might need to rungit config --local --remove-section cherry-pickerto clean up the configuration stored in.git/config.
Make sure PR target main branch.
Our goal is to avoid breaking changes whenever possible. Therefore, we should allow time for community members to review PRs that contain such changes - please avoid rushing to merge them. Also, please make sure that such PRs contain a significant newsfragment that contains **Breaking Change**.
Milestone will be added only to the original PR.
v3-1-test directly - milestone will be on that PR.main with backport PR targeting v3-1-test. Milestone will be added only on the PR targeting v3-1-main.Set for any feature that targets Airflow 3.x only.