Skip to content

Conversation

@yangw-dev
Copy link
Contributor

@yangw-dev yangw-dev commented Nov 20, 2025

we run into some memory issues, so improve some utilization queries:

  1. list_util_metadata is called when a commit page is loaded, let's just show the button when a job is finished, if no util is record, let the page handle it.
  2. change the util api to job_utilization, and not call the api unless the workflowId and jobId is ready

@vercel
Copy link

vercel bot commented Nov 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
torchci Ready Ready Preview Nov 21, 2025 0:26am

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 20, 2025
@yangw-dev yangw-dev requested a review from clee2000 November 20, 2025 23:43
let shouldFetch = workflowId && jobId;
let { data, error } = useSWRImmutable(
`/api/utilization/${workflowId}/${jobId}/${attempt}`,
shouldFetch ? `/api/utilization/${workflowId}/${jobId}/${attempt}` : null,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

block the undefined call even from the call side

Copy link
Contributor

Choose a reason for hiding this comment

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

They can still just curl from command line or something if they want tho

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yah, i can add some auth token for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@yangw-dev yangw-dev merged commit ce582d0 into main Nov 21, 2025
5 checks passed
@yangw-dev yangw-dev deleted the blockundefiend branch November 21, 2025 00:31
`/api/utilization/${workflowId}/${jobId}/${attempt}`,
shouldFetch
? `/api/job_utilization/${workflowId}/${jobId}/${attempt}`
: null,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to pass in the authorization token here? I mean it does block the api, but now I think it blocks for every one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants