Stop Job Logs fetching updates once Job status is 'completed'
Summary
- While a CI job is running, the UI hits the Job Logs API to obtain the latest output of the job
- Once the job is completed, the UI continues hitting the Job Logs API even though there will be no further output
- This could be optimised to mitigate a marginal amount of load hitting the Job Logs endpoint
Improvements
- In parallel to hitting the Job Logs API, the UI also pulls the Job itself
- The response to this parallel request contains a property (
complete
) which indicates if the job has completed execution - If the job has completed, the UI could cease trying to obtain the updated Job Logs output
Risks
N/A
as far as I can tell!
Involved components
This appears to involve a slight modification to the job_app
vue file
- Potentially in this code section - I note that there is a comment linking to this issue, however the linked issue has not been updated since January last year.