Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add backporting bot #4795

Merged
merged 22 commits into from
Aug 28, 2024
Merged

CI: Add backporting bot #4795

merged 22 commits into from
Aug 28, 2024

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Jun 14, 2024

Adds a bot that automatically opens MRs into the stable2407 branch when the A4-needs-backport label is applied to a merged MR.

TODO:

  • Settle on label vs error message trade-off (resolved)

docs:

Backporting

This document explains how to backport a merged PR from master to one of the stable* branches. Backports should only be used to fix bugs or security issues - never to introduce new features.

Steps

  1. Fix a bug through a PR that targets master.
  2. Add label A4-needs-backport to the PR.
  3. Merge the PR into master.
  4. Wait for the bot to open the backport PR.
  5. Ensure the change is audited or does not need audit.
  6. Merge the backport PR.

The label can also be added after the PR is merged.

Example

For example here where the dev triggered the process by adding the label after merging:

backport-ex2

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez marked this pull request as ready for review June 14, 2024 08:59
@ggwpez ggwpez requested review from a team as code owners June 14, 2024 08:59
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez marked this pull request as draft June 14, 2024 09:01
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez closed this Jun 14, 2024
@ggwpez ggwpez reopened this Aug 27, 2024
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez marked this pull request as ready for review August 27, 2024 14:11
@EgorPopelyaev
Copy link
Contributor

What is the plan for the next stable? Is this action going to be adjusted or extended with another job?

@ggwpez
Copy link
Member Author

ggwpez commented Aug 27, 2024

What is the plan for the next stable? Is this action going to be adjusted or extended with another job?

Yes good Q. The CI action supports multiple branches. So we can add variants to the target_branches entry.
Alternatively if we opt for the label approach, then we would need to add a new label like A4-needs-backport-stable2410.

I tested the first approach in a private repo:

Screenshot 2024-08-27 at 17 04 08

@EgorPopelyaev
Copy link
Contributor

The option with the target branches looks not too bad. It is probably easier than to create a new label for each release.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez changed the title CI: Add /backport cmd CI: Add backporting bot Aug 28, 2024
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added the R0-silent Changes should not be mentioned in any release notes label Aug 28, 2024
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez enabled auto-merge August 28, 2024 18:08
@ggwpez ggwpez added this pull request to the merge queue Aug 28, 2024
Merged via the queue into master with commit 5620196 Aug 28, 2024
187 of 188 checks passed
@ggwpez ggwpez deleted the oty-backport-ci branch August 28, 2024 22:02
ordian added a commit that referenced this pull request Aug 29, 2024
* master: (39 commits)
  short-term fix for para inherent weight overestimation (#5082)
  CI: Add backporting bot (#4795)
  Fix benchmark failures when using `insecure_zero_ed` flag (#5354)
  Command bot GHA v2 - /cmd <cmd> (#5457)
  Remove pallet::getter usage from treasury (#4962)
  Bump blake2b_simd from 1.0.1 to 1.0.2 (#5404)
  Bump rustversion from 1.0.14 to 1.0.17 (#5405)
  Bridge zombienet tests: remove old command (#5434)
  polkadot-parachain: Add omni-node variant with u64 block number (#5269)
  Refactor verbose test (#5506)
  Use umbrella crate for minimal template (#5155)
  IBP Coretime Polkadot bootnodes (#5499)
  rpc server: listen to `ipv6 socket` if available and `--experimental-rpc-endpoint` CLI option (#4792)
  Update approval-voting-regression-bench (#5504)
  change try-runtime rpc domains (#5443)
  polkadot-parachain-bin: Remove contracts parachain (#5471)
  Add feature to allow Aura collator to use full PoV size (#5393)
  Adding stkd bootnodes (#5470)
  Make `PendingConfigs` storage item public (#5467)
  frame-omni-bencher maintenance (#5466)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants