-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1448): allow user to select multi agents when creating multi-node session #4309
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
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
98e011d to
589e38d
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.
Pull Request Overview
This PR enables multi-agent selection when creating multi-node sessions for Backend.AI manager version 25.15.0 and above. It transforms the agent selection from a single dropdown to a multi-select component while maintaining backward compatibility.
- Added 'multi-agents' feature detection for manager version 25.15.0+
- Modified AgentSelect component to support multiple agent selection with special "auto" handling
- Updated session creation payload logic to properly handle agent arrays and cluster size requirements
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/lib/backend.ai-client-esm.ts | Added feature flag detection for multi-agents support |
| react/src/pages/SessionLauncherPage.tsx | Updated session creation payload logic and default agent value format |
| react/src/components/ResourceAllocationFormItems.tsx | Modified form to support multi-agent selection and removed cluster restrictions |
| react/src/components/AgentSelect.tsx | Enhanced component to handle multiple selection with auto option logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.64% (-0.15% 🔻) |
530/11414 |
| 🔴 | Branches | 3.73% (-0.16% 🔻) |
302/8088 |
| 🔴 | Functions | 2.88% (-0.06% 🔻) |
102/3539 |
| 🔴 | Lines | 4.59% (-0.15% 🔻) |
512/11158 |
Show files with reduced coverage 🔻
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🟢 | ... / graphql-transformer.ts |
82.26% (-4.92% 🔻) |
79.41% (-5.2% 🔻) |
71.43% (-3.57% 🔻) |
83.61% (-4.71% 🔻) |
| 🔴 | ... / AgentSelect.tsx |
3.7% (-1.3% 🔻) |
0% | 0% | 3.7% (-1.3% 🔻) |
| 🔴 | ... / ResourceAllocationFormItems.tsx |
13.81% (-0.06% 🔻) |
9.46% (-0.34% 🔻) |
12% (-0.16% 🔻) |
13.56% (-0.06% 🔻) |
Test suite run success
121 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from 5313409
ironAiken2
left a comment
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.
please resolve the conflicts :)
589e38d to
13c1e92
Compare
yomybaby
left a comment
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.
Code improvements
1. ResourceAllocationFormItems.tsx
- Improved code readability by removing spread operator and passing props directly
modeandlabelRenderprops are now more explicitly defined
2. SessionLauncherPage.tsx
- Simplified array handling by replacing
Array.isArray()check with_.castArray() - Better utilization of lodash utility function for cleaner code
a30d7fe to
f0ef289
Compare
agatha197
left a comment
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.
please resolve the conflicts. and is there any test node? you can reply it in jira comment or teams.
f0ef289 to
9dafe79
Compare
9dafe79 to
7b6d945
Compare
7b6d945 to
9a85373
Compare
9a85373 to
f8713f6
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.
How about dealing with only array of agents for reducing redundant checking? I think most of default values are already array.
f8713f6 to
4d0c039
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
agatha197
left a comment
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.
4d0c039 to
5313409
Compare


resolves #4256 (FR-1448)
This PR adds support for selecting multiple agents when launching a session, available for Backend.AI manager version 25.15.0 and above.
Key changes:
AgentSelectcomponent to handle multiple agent selectionResourceAllocationFormItemsto support multi-agent modefor testing, using test server which supports multi node session(like dogbowl)
Prior to version 25.16.0, it must behave identically to the existing version.
how to test:
Checklist: