-
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
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.46% | 517/11601 |
| 🔴 | Branches | 3.61% | 297/8237 |
| 🔴 | Functions | 2.59% | 92/3552 |
| 🔴 | Lines | 4.43% | 503/11348 |
Test suite run success
118 tests passing in 13 suites.
Report generated by 🧪jest coverage report action from 7ea5f0e
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
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
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.
5313409 to
237e10d
Compare
237e10d to
9d7f1b2
Compare
9d7f1b2 to
212cf3d
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.
LGTM
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.
212cf3d to
14f370c
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.
LGTM
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.
LGTM
14f370c to
0597693
Compare
Merge activity
|
…node session (#4309) resolves #4256 (FR-1448) This PR adds support for selecting multiple agents when launching a session, available for [Backend.AI](http://Backend.AI) manager version 25.15.0 and above. Key changes: - Modified `AgentSelect` component to handle multiple agent selection - Updated agent selection logic in `ResourceAllocationFormItems` to support multi-agent mode - Added special handling for the "auto" option in multi-select mode - Implemented proper agent_list generation in session creation payload - Added 'multi-agents' feature detection for manager version 25.16.0+ - Changed agent default value from string to array format ['auto'] - Removed restrictions that previously disabled cluster settings when a specific agent was selected **for 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: - single mode - Please verify that the agent_list is sent as a string[] when using multi-agents. - multi mode - Please verify that the agent_list is being passed as a string array when using multi-agents. ![CleanShot 2025-09-19 at [email protected]](https://app.graphite.dev/user-attachments/assets/e078b5c2-c9e7-4bb0-b74a-3654f9b22503.png) ![CleanShot 2025-09-19 at [email protected]](https://app.graphite.dev/user-attachments/assets/adcbb2fb-388c-4f98-9d45-161b20e69550.png) ![CleanShot 2025-11-13 at [email protected]](https://app.graphite.com/user-attachments/assets/6dcd76fa-fcc7-4f8c-bfd0-bca9ba34c1a0.png) **Checklist:** - [ ] Documentation - [x] Minium required manager version: 25.16.0 - [ ] Specific setting for review - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
0597693 to
7ea5f0e
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: