-
Notifications
You must be signed in to change notification settings - Fork 354
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
fix: API migration to improve performance in resource pool page #9056
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
5021c86
to
45a7196
Compare
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.
lgtm we want to make sure agent.slots is not used anywhere in the cluster page but the topology view.
2b9ca08
to
fdf1093
Compare
3102b90
to
ae73ef6
Compare
ae73ef6
to
7d1baf9
Compare
@@ -481,7 +481,8 @@ export const getTelemetry: DetApi<EmptyParams, Api.V1GetTelemetryResponse, Telem | |||
export const getAgents: DetApi<EmptyParams, Api.V1GetAgentsResponse, Type.Agent[]> = { | |||
name: 'getAgents', | |||
postProcess: (response) => decoder.jsonToAgents(response.agents || []), | |||
request: () => detApi.Cluster.getAgents(), | |||
request: () => | |||
detApi.Cluster.getAgents(undefined, undefined, undefined, undefined, undefined, true), |
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.
I have some changes in this branch where I was working toward parameterizing getting slots so that we can still use it for topology in case it helps
that branch also includes some changes for disabling topology
basically if and only if agents < 1000 && slotCount < 10000 then we want to pull down slots and render toplogy
29719a0
to
19fe58e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9056 +/- ##
==========================================
- Coverage 47.16% 40.57% -6.59%
==========================================
Files 1150 829 -321
Lines 141674 102591 -39083
Branches 2415 2416 +1
==========================================
- Hits 66814 41630 -25184
+ Misses 74670 60771 -13899
Partials 190 190
Flags with carried forward coverage won't be shown. Click here to find out more.
|
19fe58e
to
2f5b3c6
Compare
thanks for working on this! I posted some questions and comments |
4760395
to
80f82ba
Compare
80f82ba
to
ca558d3
Compare
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.
javascript looks good
I can see the toplogy turning on and off as expected. but I also do see a request to fetch all the slots in a scenario I wasn't expecting this case has 1m slots
determined/webui/react/src/pages/ResourcePool/ResourcepoolDetail.tsx Lines 96 to 98 in 921bd0d
|
7cc080a
to
ce5f792
Compare
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.
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.
thanks for fixing that issue. I see the ui is double requesting agents now on a recurring basis we can say we want the latest numbers on agents to be able to turn topology on or off if the situation changes but maybe just relying on the initial agent response once is enough?
this only happens when the conditions to show the topology is met eg the cluster is smaller so it's probably fine?
i think this should be fine because both APIs are used for different purposes and calling APIs is cheaper than the original issue. |
* squash squash * fix: API migration for resource pool * fix: removed unused code * fix: migrate `slotContainerStates` with the new agent schema * test: test cases for `getSlotContainerStates` * fix: better type * test: add edae case * fix: minor rebase fixes * feat: topology workaround * fix: minor fixes * fix: add condition to show topology * fix: feedback * fix: avoid call agent api if there are too many nodes or slots * fix: polling agent with slots --------- Co-authored-by: Hamid Zare <12127420+hamidzr@users.noreply.github.com> (cherry picked from commit 17287f5)
test steps for posterity |
Description
ET-104
Related to #9048
Test Plan
Slots Allocated
bars show the correct dataCommentary (optional)
Merge this after #9048
Checklist
docs/release-notes/
.See Release Note for details.
Ticket