Revert "Preserve variables when switching branches on run pipeline page"
What does this MR do and why?
This MR reverts Preserve variables when switching branches on r... (!213718 - merged). It turned out the issue for preserving pipeline variables was not refined well enough, and this change disrupted our customers' workflow. We need to revert it temporarily until we design a proper UX.
References
- Preserve variables when switching branches on r... (!213718 - merged)
- Preserve variables when switching branches on r... (#486983 - closed)
- Manual pipeline prefilled variables always load... (#582702 - closed)
Screenshots or screen recordings
Screen_Recording_2025-12-11_at_11.41.25
How to set up and validate locally
Prerequisites
- Create a project with a
.gitlab-ci.ymlconfiguration on main branch:
variables:
TEXT:
value: "MAIN-VAR"
description: "desc"
test_job:
script:
- echo "test"
- Create a feature branch with a different
.gitlab-ci.yml:
variables:
TEXT:
value: "FEATURE-VAR"
description: "desc"
test_job:
script:
- echo "test"
- Create a no-variables branch with a
.gitlab-ci.ymlthat has no variables:
test_job:
script:
- echo "test"
Test Steps
- Navigate to Build → Pipelines → New pipeline
- Verify the variables are changing for each ref
- Try creating a new variable on the UI, switch to another ref, and verify the variable was not preserved
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #486983 (closed)
Edited by Anna Vovchenko