Properly fix backport MRs breaking release pipelines
Currently there's a race when landing a MR to a branch and doing a straight backport from that branch to other branches.
Consider this scenario:
- a MR is opened against
apertis/v2023dev1
- the MR is reviewed normally and everything is ok
- the MR is landed while the CI system is quite loaded
- a developer quickly creates a new MR from
apertis/v2023dev1
toapertis/v2022
to backport the just-landed fixes - the CI finally catches up and notices the new commits on the
apertis/v2023dev1
branch - since there's an open MR from
apertis/v2023dev1
toapertis/v2022
the CI system will not create a pipeline for theapertis/v2023dev1
branch, and will only run the one in the MR context targetingapertis/v2022
The undesirable result is that the changes landed on
apertis/v2023dev1
do not get uploaded, since the branch pipeline
meant to do that is skipped.
The run_on_mr_xor_branch_rule
condition is meant to:
- run pipelines in MR context to reliably derive the target release
from the target branch to e.g. use the v2021 docker images when
targeting
apertis/v2021-security
- avoid running two pipelines when one is enough and the other would fail anyway, e.g. trying to build a v2021 package using a v2023dev1 docker image
We can opt $OSNAME/*
branches out of that because neither goals
actually apply: the pipeline knowns the right target release by
definition and we actually want to run both pipelines in the
different contexts with different target releases.
!228 (merged) was intended to fix this, but instead it resulted in backport MRs uploading their CI results to the release repos (!231 (merged)). Instead, just don't block release pipelines from running when a backport MR is open.