-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[ui] don't assume that an allocation has a task events array when checking if it hasBeenRestarted #20383
[ui] don't assume that an allocation has a task events array when checking if it hasBeenRestarted #20383
Conversation
b1ec864
to
2328d32
Compare
…ts, which can sometimes be null
2328d32
to
4cb7941
Compare
Ember Test Audit comparison
|
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!
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.
Elvis operator to the rescue
…ts, which can sometimes be null (#20383)
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
the hasBeenRestarted allocation property checks against its task events, which can sometimes be null
This can result on a job-index-page error when calculating the
filteredAllocations
to show (we don't show those allocations as "failed" that have been restarted/rescheduled if other more recent ones exist, up to a job's desired count)(The
?.
is a defensive pattern that fails truthiness checks when the object in question doesn't exist, sos.events?.content
will returnnull
instead of erroring)