Expose finished_at in job details JSON
What does this MR do and why?
This MR fixes a bug where the time a job has been running (including when it is complete), the running time, is always labelled Elapsed time in the job sidebar. This, however, is not intended following the change of !75811 (merged), and the running time should be labelled Elapsed time only when the job is running and default to the Duration text.
The bug is fixed by adding finished_at
to the BuildDetailsEntity
because it was missing there.
This should also bring back—or perhaps, show for the first time—the Finished field in the job page sidebar, which was added over a year ago (didn't find the exact MR easily). It denotes the relative date when the job finished.
I added a changelog entry because this fixes two problems and isn't technically a regression of !75811 (merged); that MR was not correctly tested on my part, I think.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Go to a project (with CI)
- Trigger a pipeline
- Go to a running job
- See that the job running time is labelled as Elapsed time
- Wait for the job to finish
- See that the running time is now labelled as Duration, as intended per !75811 (merged)
Note: if you want to test both before and after in one instance, you should run gdk restart rails
after switching because the JSON response is cached.
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 #348264 (closed)