Fix downstream file variable spec to not create another pipeline
What does this MR do and why?
Attempting to address flakiness in https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa/specs/features/api/4_verify/file_variable_downstream_pipeline_spec.rb
Failure https://gitlab.com/gitlab-org/gitlab/-/issues/419474
What I observed from the latest failure report is that, there were 2 pipelines created in upstream project where we only expected 1. I can't really explain why that would cause both pipelines to failed which lead to the test timeout and the above failure. In this MR, I attempted to:
- Retrieve the upstream_pipeline by providing its id when call
create
. Because without id, a new pipeline would be created. - Rename the variables and methods for readability.
I ran the test multiple times against GDK and Staging with this fix and it passed every time. Hopefully this is just what it needs.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
To run against GDK
$ GITLAB_QA_ACCESS_TOKEN=<PAT> QA_GITLAB_URL=http://<local.ip.adress>:3000/ bundle exec rspec qa/specs/features/api/4_verify/file_variable_downstream_pipeline_spec.rb
To run against Staging
$ GITLAB_ADMIN_USERNAME="gitlab-qa-bot" GITLAB_ADMIN_PASSWORD=<password> GITLAB_QA_USER_AGENT=<agent> GITLAB_QA_ADMIN_ACCESS_TOKEN=<token> QA_GITLAB_URL=https://staging.gitlab.com bundle exec rspec qa/specs/features/api/4_verify/file_variable_downstream_pipeline_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #419474