Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

@BrunoQuaresma BrunoQuaresma self-assigned this Dec 3, 2024
Copy link
Member

@Parkreiner Parkreiner left a 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

Comment on lines 173 to 176
const expectedScriptTimingsCount = workspace.latest_build.resources
.flatMap((r) => r.agents)
.flatMap((a) => a?.scripts)
.filter((s) => s !== undefined).length;
Copy link
Member

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:

const expectedScriptTimingsCount = workspace.latest_build.resources
  .flatMap((r) => r.agents)
  .flatMap((a) => a?.scripts ?? []).length;

"workspaceBuilds",
workspaceBuildId,
"timings",
{ readyAgentsCount },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the readyAgentCount value doing before? I see that we were only using it for the query key, and now it's gone

Copy link
Collaborator Author

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.

@BrunoQuaresma BrunoQuaresma merged commit ebfc133 into main Dec 3, 2024
29 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-timings-update branch December 3, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build timings: I have to refresh the page to see startup script timing
2 participants