Pre-Filled Variables Do Not Show Until After Page Refresh on Manual Pipeline Run
Summary
Pre-filled pipeline variables do not show when running pipeline manually, until the page is refreshed.
Steps to reproduce
I was able to reproduce this on 15.7 and on SaaS.
-
Create a new empty, project
-
Add this
.gitlab-ci.yml
file to the default branch (let's assume it'smain
):image: alpine:latest variables: var_1: description: "Variable" value: "default" build1: stage: build script: - echo "Do your build here"
-
Go to
CI/CD
->Pipelines
->Run Pipeline
. Notice that there is no pre-filled variable for the pipeline. -
If you refresh the page, it will now appear.
-
Create a new branch in the repository. (Let's call it
branch1
) -
Go to
CI/CD
->Pipelines
->Run Pipeline
. The default branch will be selected. The pre-filled variable is still present on this branch. -
Choose the
branch1
branch. Notice there is no pre-filled variables again. -
Refresh the page. It will load the default branch again. Choose the
branch1
branch again, and the pre-filled variable will be present now.
Once a new branch's pre-filled variable has been "loaded" on the new pipeline page, it will stay loaded for a long time, and you won't have to perform the "refresh workaround" to make the pre-filled variables show up for that branch. I was unable to determine the situation where it "unloads". I tried logging out of GitLab, and even restarting all of GitLab's service, and that didn't seem to have an affect.
We can instead repeat the last 4 steps, and see that each new branch does not show the pre-filled variables when trying to run a manual pipeline, until the new pipeline page has been reloaded after selecting the branch.
Screen_Recording_2022-12-21_at_4.03.50_PM
Example Project
I can provide an example project or larger screen recording in private.
What is the current bug behavior?
Pre-filled variable fields are initially missing
What is the expected correct behavior?
Pre-filled variable fields should be displayed
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible Cause
As others have mentioned, 15.6 is not affected. This begun with 15.7. (And is present on SaaS).
I managed to narrow this down to the run_pipeline_graphql
feature flag that was enabled by default in 15.7.
With this feature flag enabled on 15.6, I was able to reproduce the erroneous behaviour. Disabling it on 15.6 (which is the default), and restarting puma afterwards, I was not able to observe the erroneous behaviour anymore.
Note: this seems to require that the pipeline has been run (or some other event? timeout?) between occurrences. Navigating away and immediately back to Run Pipeline screen after refresh displays correct behavior.