Skip to content

Commit a8bbcf6

Browse files
ebeahanpchila
andauthored
Add docs for current backport labels and process. (#10317)
* Capture the basics of backporting process * broken linK * Update docs/backports.md Co-authored-by: Paolo Chilà <[email protected]> --------- Co-authored-by: Paolo Chilà <[email protected]>
1 parent 8b58b87 commit a8bbcf6

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ Keep these in mind as both authors and reviewers of PRs:
6363
* If I'm making a suggestion, I must provide a rationale for it. It should be clear to the author of the PR why my suggestion is better than what is already in the PR.
6464

6565

66+
## Backporting
67+
68+
See [Backports](./docs/backports.md).

docs/backports.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Backports
2+
3+
## Overview
4+
5+
Elastic Agent relies on backporting PRs to incorporate changes into the appropriate release branches after merging
6+
into `main`. Creating backport PRs is handled automatically using the appropriate [backport labels](https://github.com/elastic/elastic-agent/labels?q=backport).
7+
8+
To target specific release branch(es), add one or more labels `backport-<release branch name>` (e.g. `backport-9.2`). PRs can be labeled
9+
before or after the PR is merged. If added before merging, the backports will be created after merging to `main`. Adding
10+
a backport label to an already merged PR will create backports shortly after adding the label(s).
11+
12+
Mergify will automatically add a [reminder](https://github.com/elastic/elastic-agent/blob/main/.mergify.yml#L173) to any PR to `main` if missing at least one `backport-*` label. If your PR does _not_ need backporting, use the `backport-skip` label to avoid the automated comment.
13+
14+
There are also three additional `backport-*` labels to simplify which branches to target backports:
15+
16+
* `backport-active-all`: Backport to all currently active development branches (except `main`)
17+
* `backport-active-8`: Backport only to 8.x branches
18+
* `backport-active-9`: Backport only to 9.x branches
19+
20+
21+
These labels use the [`backport-active` GitHub action](https://github.com/elastic/elastic-agent/blob/main/.github/workflows/backport-active.yml#L14) to automate targeting relevant branches. More detail can be found at
22+
https://github.com/elastic/oblt-actions/blob/main/github/backport-active/README.md.
23+
24+
## Process
25+
26+
**For changes authored by an individual** - the original PR author is in charge of ensuring their original PR uses the
27+
correct labels, the backport PRs are created, pass CI, and are merged.
28+
29+
**For changes authored by automation (GitHub actions, dependabot, etc.)** - these PRs should already be labeled with
30+
`backport-active-all`. After the initial PR to `main` merges, the code reviewers (assigned based on teams defined in
31+
`CODEOWNERS`) need to verify CI passes, approve, and merge the backport PRs.

0 commit comments

Comments
 (0)