-
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] Fixes an issue where system jobs' status were set to Scaled Down when their allocs get garbage collected #24620
Conversation
… their allocs get garbage collected
1c77b2b
to
c521fc5
Compare
@@ -246,7 +246,7 @@ export default class JobStatusPanelSteadyComponent extends Component { | |||
} | |||
|
|||
const healthyAllocs = this.allocBlocks.running?.healthy?.nonCanary; | |||
if (healthyAllocs?.length === totalAllocs) { | |||
if (healthyAllocs?.length && healthyAllocs?.length === totalAllocs) { |
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.
Specifying that "0 allocs running of your 0 expected allocations!" doesn't mean "healthy"
// which is a best-guess-based-on-whats-running number. This means that if there are no current allocs, | ||
// because they've been GC'd, we don't know if they were deliberately scaled down or failed. | ||
// Safer in this case to show as failed rather than imply a deliberate scale-down. | ||
if (totalAllocs === 0 && !this.hasClientStatus) { |
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.
jobs-index level status comes from this job model computed property
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.
@@ -224,7 +224,7 @@ export default class JobStatusPanelSteadyComponent extends Component { | |||
}; | |||
} | |||
|
|||
if (this.totalAllocs === 0) { | |||
if (this.totalAllocs === 0 && !this.job.hasClientStatus) { |
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.
single-job-index-page level status comes from this component computed property
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.
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.
maybe we could add a feature for the user to configure an optimism rating, so we can show them what they want to believe in ambiguous situations 🙃
- optimism=0 : it failed.
- optimism=5 : it's scaled down!
(to be clear, this is just a joke)
Description
Found a fun UI bug today: my system job had allocations fail, and then I worked on something else for several hours, and the garbage collector subsequently removed my terminal allocs.
When viewing the job in the UI, the job showed up as "Scaled Down". This is a new status we added this summer to help show when an operator manually set a job's group counts to 0 to let it sit dormant.
While there are problems with showing an alloc-less system job as "Failed" (it may in fact have been deliberately "scaled down" by virtue of taking all eligible nodes offline, for example), this seems like it's by far the most common reason you'd have an un-GC'd system job with no allocs, and so "Scaled Down" shouldn't be the default label for it. This PR makes it so system/sysbatch jobs cannot be labelled "Scaled Down" as such.