Revert "ci: Add rules:changes:compare_to to the job rules"

This reverts commit dcd11f0a104964f7fc02c38104ed57fd0aa794a2.

In dcd11f0a104964f7fc02c38104ed57fd0aa794a2 we started making use
of gitlab's changes:compare_to in hopes of addressing #3780

However compare_to seems to have different behavior based on:

* The type of the branch
* If the repo is a fork or not
* If the pipeline is a branch or MR pipeline
* If the commit is force pushed or not
* If the pipeline is associated with a "push" event,
  * Manual and scheduled pipelines are not.

If we leave compare_to underfined and to its default value,
it causes issues with branch pipelines, as:

* If you push a new branch, it doesn't have anything to compare
against and changes: either will trigger or not, depending on the
gitlab version

* If you push to an existing branch, it only compares against the
previous commit.

* if you force push to a branch, it doesn't work at all it seems. [1]

Thankfully for merge request pipelines, it always seems to compare
against the Merge Request Target tree. But also if there is a Merge
Request open, and the value of compare_to isn't defined (say if it's a
force push or it's the first branch pipeline of the branch) it will
fallback to using the tree from the Merge Request Target, making it even
more confusing.

But if we try to overide it to fix the behavior for branches, we end up
breaking merge request. There seems to be a bug in gitlab (unclear if
its intended or not) where if you have access to the upstream
repository, gitlab will compaee_to against that in the MR pipeleine, but
otherwise it will try to compare against your fork's branch which will
certainly be outdated. Additionally it didn't seem to error out if the
branch specified doesn't exist only in one of the two places so its very
hard to reverse engineer the behavior.

[1] https://gitlab.com/gitlab-org/gitlab/-/issues/349694

Long story short, this is way more complicated than its worth, and has
caused a lot of issues since it was introduced. Revert the change and
try again another time.

Related https://gitlab.com/gitlab-org/gitlab/-/issues/389808

Close #3965

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8563>
This commit is contained in:
Jordan Petridis 2025-02-26 14:06:56 +02:00 committed by GStreamer Marge Bot
parent 1e2b103b20
commit 1747b5fa73

View File

@ -334,7 +334,6 @@ pre-commit checks:
.gtk-build-rules:
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- ".gitlab-ci.yml"
- "meson.build"
@ -371,11 +370,9 @@ pre-commit checks:
rules:
- !reference [.upstream-branch-rules, rules]
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
*modules_changes
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "subprojects/gstreamer-vaapi/**/*"
@ -515,11 +512,9 @@ build debian x86_64:
- !reference [.gtk-build-rules, rules]
- !reference [.upstream-branch-rules, rules]
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
*modules_changes
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "subprojects/win-*/*"
script:
@ -643,11 +638,9 @@ build macos:
- !reference [.gtk-build-rules, rules]
- !reference [.upstream-branch-rules, rules]
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
*modules_changes
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "subprojects/macos-*/*"
parallel:
@ -714,7 +707,6 @@ abi-check:
PYTHONFAULTHANDLER: "enabled"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
*modules_changes
script:
@ -753,11 +745,9 @@ check fedora:
TEST_SUITE: "check.gst*"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
*modules_changes
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "subprojects/gstreamer-vaapi/**/*"
@ -807,7 +797,6 @@ check video formats:
- $CI_PROJECT_DIR/ci/scripts/check-video-formats.sh
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "${VIDEO_HEADER}"
- "${WL_HEADER}"
@ -905,7 +894,6 @@ fluster v4l2-stateless on visl:
junit: build/fluster-results-*.xml
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- ".gitlab-ci.yml"
- ".gitlab-image-tags.yml"
@ -926,11 +914,9 @@ fluster v4l2-stateless on visl:
timeout: "1h30m"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
*modules_changes
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "subprojects/gstreamer-vaapi/**/*"
@ -940,7 +926,6 @@ valgrind core:
TEST_SUITE: "check.gstreamer\\..*"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "*"
- "scripts/*"
@ -954,7 +939,6 @@ valgrind base:
TEST_SUITE: "check.gst-plugins-base\\..*"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "*"
- "scripts/*"
@ -971,7 +955,6 @@ valgrind good:
TIMEOUT_FACTOR: "4"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "*"
- "scripts/*"
@ -987,7 +970,6 @@ valgrind ugly:
TEST_SUITE: "check.gst-plugins-ugly\\..*"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "*"
- "scripts/*"
@ -1004,7 +986,6 @@ valgrind bad:
TEST_SUITE: "check.gst-plugins-bad\\..*"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "*"
- "scripts/*"
@ -1021,7 +1002,6 @@ valgrind ges:
TEST_SUITE: "check.gst-editing-services\\..*"
rules:
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- "*"
- "scripts/*"
@ -1093,7 +1073,6 @@ build documentation:
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: never
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- ".gitlab-ci.yml"
- ".gitlab-image-tags.yml"
@ -1131,7 +1110,6 @@ cerbero trigger:
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: never
- changes:
compare_to: "$GST_UPSTREAM_BRANCH"
paths:
- ".gitlab-ci.yml"
- "ci/gitlab/*.py"