Skip to content

Conversation

@BrunoQuaresma
Copy link
Contributor

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

@buenos-nachos buenos-nachos 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
Contributor

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
Contributor

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
Contributor 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

3 participants