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

add: option to show/hide agent select option by launcher #2870

Conversation

lizable
Copy link
Contributor

@lizable lizable commented Nov 21, 2024

This PR resolves #2837

Changes:
Makes agent selection in resource allocation form configurable via a new enableAgentSelect prop, defaulting to false. The agent selection field will only display when both enableAgentSelect is true and baiClient._config.hideAgents is false.

Implementation:

  • Added enableAgentSelect prop to ResourceAllocationFormItems component
  • Set enableAgentSelect to true in SessionLauncherPage to maintain existing behavior
  • Agent selection field visibility now requires both configuration flags to be properly set

Testing Steps:

Prerequisites:

  • Create model type vfolder
  • Create model-definition.yaml file and upload it to the vfolder you just created in step 1, according to the link here
  1. Set hideAgents in config.general to false.
  2. Go to Session launcher page and check AgentSelect section is visible.
  3. Check whether you can select agent and create a session which is located to the agent you just selected.
  4. Go to Service launcher page by clicking Start Service button in Serving page and check AgentSelect section is invisible.
  5. Check whether service is successfully created

Checklist:

  • Mention to the original issue
  • Documentation
  • Minimum required manager version
  • Specific setting for review
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link

graphite-app bot commented Nov 21, 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.

Copy link
Contributor Author

lizable commented Nov 21, 2024

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

@github-actions github-actions bot added the size:XS ~10 LoC label Nov 21, 2024
Copy link

github-actions bot commented Nov 21, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 5.29% 395/7468
🔴 Branches
4.58% (-0% 🔻)
237/5173
🔴 Functions 3.16% 78/2467
🔴 Lines 5.2% 380/7301

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 3f18c86

@lizable lizable marked this pull request as ready for review November 21, 2024 08:47
@lizable lizable force-pushed the feature/add-option-to-show-or-hide-agent-select-option-in-launcher branch from 916a5df to 0e5d3ae Compare November 22, 2024 05:53
@github-actions github-actions bot added field:UI / UX type:fix Fix features that are not working labels Nov 22, 2024
@lizable lizable requested a review from yomybaby November 22, 2024 05:58
@lizable lizable force-pushed the feature/add-option-to-show-or-hide-agent-select-option-in-launcher branch from 0e5d3ae to c897bb1 Compare November 25, 2024 09:14
@github-actions github-actions bot added size:M 30~100 LoC and removed size:XS ~10 LoC labels Nov 25, 2024
@lizable lizable force-pushed the feature/add-option-to-show-or-hide-agent-select-option-in-launcher branch from c897bb1 to b7511dc Compare November 25, 2024 09:17
@lizable lizable requested a review from yomybaby November 25, 2024 09:22
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

Copy link

graphite-app bot commented Nov 25, 2024

Merge activity

This PR resolves [#2837](#2837)

**Changes:**
Makes agent selection in resource allocation form configurable via a new `enableAgentSelect` prop, defaulting to false. The agent selection field will only display when both `enableAgentSelect` is true and `baiClient._config.hideAgents` is false.

**Implementation:**
- Added `enableAgentSelect` prop to ResourceAllocationFormItems component
- Set `enableAgentSelect` to true in SessionLauncherPage to maintain existing behavior
- Agent selection field visibility now requires both configuration flags to be properly set

**Testing Steps:**
> Prerequisites:
> - Create model type vfolder
> - Create model-definition.yaml file and upload it to the vfolder you just created in step 1, according to the link [here](https://webui.docs.backend.ai/en/latest/model_serving/model_serving.html#guide-to-steps-for-using-model-service)
1. Set `hideAgents` in config.general to false.
2. Go to Session launcher page and check AgentSelect section is visible.
3. Check whether you can select agent and create a session which is located to the agent you just selected.
4. Go to Service launcher page by clicking `Start Service` button in Serving page and check AgentSelect section is invisible.
5. Check whether service is successfully created

**Checklist:**
- [ ] Mention to the original issue
- [ ] Documentation
- [ ] Minimum required manager version
- [ ] Specific setting for review
- [ ] Minimum requirements to check during review
- [x] Test case(s) to demonstrate the difference of before/after
@yomybaby yomybaby force-pushed the feature/add-option-to-show-or-hide-agent-select-option-in-launcher branch from b7511dc to 3f18c86 Compare November 25, 2024 09:28
@graphite-app graphite-app bot merged commit 3f18c86 into main Nov 25, 2024
7 checks passed
@graphite-app graphite-app bot deleted the feature/add-option-to-show-or-hide-agent-select-option-in-launcher branch November 25, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
field:UI / UX size:M 30~100 LoC type:fix Fix features that are not working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide agent select in Service launcher
2 participants