Fix manual variable infinite polling
What does this MR do and why?
Resolves #377269 (closed)
When we are viewing a manual job, we do not want to poll for the job log if we are in the state of updating variables. There is no need to poll here. We only want to poll for a job log if we are not updating variables.
This is just a pre-requisite to more updates coming to this page. You can view the epic attached to this issue for more information about upcoming work.
Screenshots or screen recordings
should not poll for job log | should poll for job log (trace.json?state=...) |
---|---|
How to set up and validate locally
- Navigate to CI/CD > Editor
- Set up a manual job in your editor. Assuming your have 2 variables,
varOne
andvarTwo
, you can use this:
manual_job:
script:
- echo "$varOne" "$varTwo"
when: manual
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- Navigate to the manual job after committing your change, which should automatically run a pipeline. (CI/CD > Jobs)
- You should see an empty state with the manual variable form. Open dev tools > network tab and add 'json' to the filter.
- Insure that we are not polling for job log. There should only be one poll firing for 'job'
- Click 'Trigger this manual job' in the UI
- The page should re-route to the running job, and you should see the job log polling in the network tab (endpoint ends with 'trace.json')
- If you click the blue dropdown to re-run the job and click "Update variables", the job log poll should again stop when the manual variables form appears.
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.
Edited by Briley Sandlin