-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🪟 🐛 Fix JobService for jobs without attempts #20527
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the log just empty in this scenario?
We can't even load the log in this case, thus I think this implementation won't solve it alone. I'm waiting for feedback from platform workflow to understand how we can end up in scenarios without attempts at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, did not test locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What
There are sometimes jobs that don't have any attempts (yet). When we load them this code broke, since we tried to access
attempt.endedAt
onundefined
now. Fixed this to make sure we have any attempts actually before trying to get the last one.Since we can't fetch any logs in this case, we're actually just showing now a simple error message when the job is expanded:
The code below that line already handled the case when
lastAttemptEndTimestamp
is undefined.