- Notifications
You must be signed in to change notification settings - Fork927
fix: display build timings when all timings are loaded#15728
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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.
Looks good! Had one question to make sure I'm properly understanding something, but it's tiny and shouldn't cause any problems
const expectedScriptTimingsCount = workspace.latest_build.resources | ||
.flatMap((r) => r.agents) | ||
.flatMap((a) => a?.scripts) | ||
.filter((s) => s !== undefined).length; |
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.
Tiny nit, but I want to say this can be cleaned up as:
constexpectedScriptTimingsCount=workspace.latest_build.resources.flatMap((r)=>r.agents).flatMap((a)=>a?.scripts??[]).length;
"workspaceBuilds", | ||
workspaceBuildId, | ||
"timings", | ||
{ readyAgentsCount }, |
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 was thereadyAgentCount
value doing before? I see that we were only using it for the query key, and now it's gone
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.
It was to refetch the query when a new agent was marked as ready but it was very buggy and a bad decision on my end. The current refetch logic makes more sense and it is easier to follow.
ebfc133
intomainUh oh!
There was an error while loading.Please reload this page.
Fix#15273