Skip to content
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: ensure valid accelerator type #2729

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Sep 30, 2024

Note

This PR resolves the same problem as #2721 but via a different approach.

Changes:

This PR ensures a valid accelerator type when the Resource group is changed. Additionally, this PR refactors the usage of resource slot details across multiple components. The main changes include:

  1. Calling ensureValidAcceleratorType when updateAllocationPresetBasedOnResourceGroup is called.
  2. The ensureValidAcceleratorType function now uses the response from /func/config/resource-slots/details?sgroup=ooooo.
  3. Updating the useResourceSlotsDetails hook to return an object with named properties instead of an array.
  4. Replacing resourceSlotsDetails with mergedResourceSlots throughout the codebase.
  5. Adjusting component imports and usage of the useResourceSlotsDetails hook.

Copy link

graphite-app bot commented Sep 30, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the size:L 100~500 LoC label Sep 30, 2024
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @yomybaby and the rest of your teammates on Graphite Graphite

@yomybaby yomybaby changed the title refactor: useResourceSlotsDetails returns details info fix: ensure valid accelerator type Sep 30, 2024
@yomybaby yomybaby marked this pull request as ready for review September 30, 2024 13:52
Copy link

github-actions bot commented Sep 30, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
5.33% (+0% 🔼)
340/6380
🔴 Branches 4.82% 214/4439
🔴 Functions
3% (-0% 🔻)
63/2102
🔴 Lines
5.23% (+0% 🔼)
326/6233
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 hooks/backendai.tsx
10.13% (-0.13% 🔻)
0% 0%
10.39% (-0.14% 🔻)

Test suite run success

90 tests passing in 11 suites.

Report generated by 🧪jest coverage report action from 1f36c1c

@yomybaby yomybaby merged commit 431f70d into main Sep 30, 2024
8 checks passed
@yomybaby yomybaby deleted the fix/ensure-valid-accelerator-type branch September 30, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant