Fix pipeline minutes calculation for non-started builds
What does this MR do and why?
Addresses sentry errors: https://new-sentry.gitlab.net/organizations/gitlab/issues/72454/?project=3&referrer=gitlab_integration
When a build is completed but has no duration, the minutes calculation will error out.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Ensure there's only 1 runner picking up jobs
- gitlab-ci.yml should be something like
build osx:
stage: build
script:
- echo "a"
artifacts:
paths:
- binaries/
test osx:
stage: test
script:
- echo "b"
dependencies:
- build osx
when: manual
- When
build osx
finishes. Remove the job via the UI's delete button on the job - Run the manual job
test osx
- this should fail as it depends on previous job - Navigating to pipeline will error out (this MR fixes that)
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 #404550 (closed)
Edited by Max Fan