-
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] Adds a "Scheduling" filter to the job.allocations page #17227
[ui] Adds a "Scheduling" filter to the job.allocations page #17227
Conversation
@@ -48,7 +48,7 @@ | |||
@condition={{not (eq type.label "unplaced")}} | |||
@route="jobs.job.allocations" | |||
@model={{@job}} | |||
@query={{hash status=(concat '["' type.label '"]') version=(concat '[' (keys this.versions) ']')}} | |||
@query={{hash status=(concat '["' type.label '"]') version=(concat '[' (map-by "version" this.versions) ']')}} |
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.
Noted that I was being inconsistent after changing my version sorting logic a few PRs ago.
Ember Asset Size actionAs of 8525f9d Files that got Bigger 🚨:
Files that stayed the same size 🤷:
|
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.
Just need to fix api/allocations.go
, otherwise it will return the wrong value.
A .changelog
entry would be good as well since it's a change to the API return content.
@@ -326,6 +326,7 @@ func (a *Allocation) Stub() *AllocationListStub { | |||
TaskStates: a.TaskStates, | |||
DeploymentStatus: a.DeploymentStatus, | |||
FollowupEvalID: a.FollowupEvalID, | |||
NextAllocation: a.JobID, |
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.
NextAllocation: a.JobID, | |
NextAllocation: a.NextAllocation, |
@query={{hash scheduling=(concat '["has-been-rescheduled"]') version=(concat '[' @job.latestDeployment.versionNumber ']')}} | ||
@label="View Allocations" | ||
@class="failed-or-lost-link" | ||
> | ||
{{@allocs.length}} | ||
</ConditionalLinkTo> | ||
{{/if}} | ||
{{#if (eq @title "Restarted")}} | ||
<ConditionalLinkTo | ||
@condition={{this.shouldLinkToAllocations}} | ||
@route="jobs.job.allocations" | ||
@model={{@job}} | ||
@query={{hash scheduling=(concat '["has-been-restarted"]') version=(concat '[' @job.latestDeployment.versionNumber ']')}} |
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 is being concatened in (concat '["has-been-rescheduled"]')
and (concat '["has-been-restarted"]')
? It seems like it's just a string?
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.
Good catch; this was an artefact from earlier! Will fix.
Adds a new filter, "Scheduling", to the job allocations page. This helps facilitate Rescheduled/Restarted links from the upcoming Job Status Panel and gives us future options for letting users drill down on this list page.
Because of some seen inconsistencies in testing, this adds
NextAllocation
to Allocations in their list/stub form from our API, where before they only existed when an allocation was being fetched individually. This, combined with a check for FollowUpEvalID, gives us a better picture of "Is a terminal allocation never going to be rescheduled?", which the UI is seeking to show to users here.Resolves #17221