Add Backport automation for separately versioned content #3889
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.
This is a WIP. Feedback is very welcome.
Summary
This PR adds two new automations to the observability-docs repo:
add-backport-labels.yml
clean-backports.yml
Contributor flow
This PR proposes the following contributor flow:
serverless
,stateful
, orcloud
. Note thatcloud
is not currently relevant to this repo.add-backport-labels.yml
automation will run. This automation uses thelabel-mapping.yml
file to map the deployment-type labels to the relevant backport branches. For example, if the PR is labeled withstateful
, thestateful
label would be removed and replaced with thebackport-8.13
andbackport-8.12
labels.backport-*
labels.clean-backports.yml
will run. This automation uses regex to match the base branch of the backport PR with any block-listed directories. In this PR,backport-mapping.yml
block-lists theserverless
dir for branches that match the following regex pattern:[7,8].*
. This means if our original PR had both serverless and stateful content, and has a backport that is targeting 8.13, an automation will run thatrm -rf serverless
on the backport PR. This ensures serverless content is not backported to branches other thanmain
even when it exists in a stateful PR.Problems solved