|
| 1 | +<!--- |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + or more contributor license agreements. See the NOTICE file |
| 4 | + distributed with this work for additional information |
| 5 | + regarding copyright ownership. The ASF licenses this file |
| 6 | + to you under the Apache License, Version 2.0 (the |
| 7 | + "License"); you may not use this file except in compliance |
| 8 | + with the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, |
| 13 | + software distributed under the License is distributed on an |
| 14 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + KIND, either express or implied. See the License for the |
| 16 | + specific language governing permissions and limitations |
| 17 | + under the License. |
| 18 | +--> |
| 19 | + |
| 20 | +# Release Management |
| 21 | + |
| 22 | +This page describes DataFusion release branches and backports. For the |
| 23 | +maintainer release guide, including release candidate artifacts, voting, and |
| 24 | +publication, see [the release process README in `dev/release`]. |
| 25 | + |
| 26 | +## Overview |
| 27 | + |
| 28 | +DataFusion typically has a major release about once per month, including |
| 29 | +breaking API changes. Patch releases are made on an ad hoc basis, but we try to |
| 30 | +avoid them because major releases are frequent. |
| 31 | + |
| 32 | +New development happens on the [`main` branch]. Releases are made from release |
| 33 | +branches named `branch-NN`, such as [`branch-50`] for the `50.x.y` release |
| 34 | +series. |
| 35 | + |
| 36 | +In general: |
| 37 | + |
| 38 | +- New features land on [`main`] |
| 39 | +- Patch releases are cut from the corresponding `branch-NN` |
| 40 | +- Only targeted, low-risk fixes should be added to a release branch |
| 41 | + |
| 42 | +Changes reach a release branch in one of two ways: |
| 43 | + |
| 44 | +- (Most common) Fix the issue on `main` and then backport the merged change to the release branch |
| 45 | +- Fix the issue on the release branch and then forward-port the change to `main` |
| 46 | + |
| 47 | +Releases are coordinated in a GitHub issue, such as the |
| 48 | +[release issue for 50.3.0]. If you think a fix should be included in a patch |
| 49 | +release, discuss it on the relevant tracking issue first. You can also open the |
| 50 | +backport PR first and then link it from the tracking issue. |
| 51 | + |
| 52 | +To prepare for a new release series, maintainers: |
| 53 | + |
| 54 | +- Create a new branch from `main`, such as `branch-50`, in the Apache repository |
| 55 | +- Continue merging new features to `main` |
| 56 | +- Prepare the release branch for release by updating versions, changelog content, |
| 57 | + and any additional release-specific fixes via the |
| 58 | + [Backport Workflow](#backport-workflow) |
| 59 | +- Create release candidate artifacts from the release branch |
| 60 | +- After approval, publish to crates.io, ASF distribution servers, and Git tags |
| 61 | + |
| 62 | +## Backport Workflow |
| 63 | + |
| 64 | +The usual workflow is: |
| 65 | + |
| 66 | +1. Fix on `main` first, and merge the fix via a normal PR workflow. |
| 67 | +2. Cherry-pick the merged commit onto the release branch. |
| 68 | +3. Open a backport PR targeting the release branch (examples below). |
| 69 | + |
| 70 | +- [Example backport PR] |
| 71 | +- [Additional backport PR example] |
| 72 | + |
| 73 | +### Inputs |
| 74 | + |
| 75 | +To backport a change, gather the following information: |
| 76 | + |
| 77 | +- Target branch, such as `apache/branch-52` |
| 78 | +- The release tracking issue URL, such as https://github.com/apache/datafusion/issues/19692 |
| 79 | +- The original PR URL, such as https://github.com/apache/datafusion/pull/20192 |
| 80 | +- Optional explicit commit SHA to backport |
| 81 | + |
| 82 | +### Apply the Backport |
| 83 | + |
| 84 | +Start from the target release branch, create a dedicated backport branch, and |
| 85 | +use `git cherry-pick`. For example, to backport PR #1234 to `branch-52` when |
| 86 | +the commit SHA is `abc123`, run: |
| 87 | + |
| 88 | +```bash |
| 89 | +git checkout apache/branch-52 |
| 90 | +git checkout -b alamb/backport_1234 |
| 91 | +git cherry-pick abc123 |
| 92 | +``` |
| 93 | + |
| 94 | +### Test |
| 95 | + |
| 96 | +Run tests as described in the [testing documentation]. |
| 97 | + |
| 98 | +### Open the PR |
| 99 | + |
| 100 | +Create a PR against the release branch, not `main`, and prefix it with |
| 101 | +`[branch-NN]` to show which release branch the backport targets. For example: |
| 102 | + |
| 103 | +- `[branch-52] fix: validate inter-file ordering in eq_properties() (#20329)` |
| 104 | + |
| 105 | +Use a PR description that links the tracking issue, original PR, and target |
| 106 | +branch, for example: |
| 107 | + |
| 108 | +```markdown |
| 109 | +- Part of <tracking-issue-url> |
| 110 | +- Closes <backport-issue-url> on <branch-name> |
| 111 | + |
| 112 | +This PR: |
| 113 | + |
| 114 | +- Backports <original-pr-url> from @<author> to the <branch-name> line |
| 115 | +``` |
| 116 | + |
| 117 | +[`main` branch]: https://github.com/apache/datafusion/tree/main |
| 118 | +[`branch-50`]: https://github.com/apache/datafusion/tree/branch-50 |
| 119 | +[the release process readme in `dev/release`]: https://github.com/apache/datafusion/blob/main/dev/release/README.md |
| 120 | +[release issue for 50.3.0]: https://github.com/apache/datafusion/issues/18072 |
| 121 | +[example backport pr]: https://github.com/apache/datafusion/pull/18131 |
| 122 | +[additional backport pr example]: https://github.com/apache/datafusion/pull/20792 |
| 123 | +[testing documentation]: testing.md |
0 commit comments