fix(FR-2651): list all model-store folders when creating a model card#6888
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
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. |
There was a problem hiding this comment.
Pull request overview
Updates the model-card creation modal’s vfolder selector so that “model-store” folders are included in the selectable list when creating a model card.
Changes:
- Adjusted the
BAIVFolderSelectfilter to includeusage_mode == "model". - Removed
currentProjectIdscoping from the vfolder selector, expanding the query scope beyond the current project.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 9.01% (-0% 🔻) |
1857/20617 |
| 🔴 | Branches | 8.18% | 1187/14514 |
| 🔴 | Functions | 5.28% (-0% 🔻) |
295/5586 |
| 🔴 | Lines | 8.74% (-0% 🔻) |
1749/20003 |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from fd4eab0
17f951c to
6c672c8
Compare
5c9206d to
444c84b
Compare
ironAiken2
left a comment
There was a problem hiding this comment.
https://app.graphite.com/github/pr/lablup/backend.ai-webui/6531/e2e(FR-2504)-add-E2E-tests-for-RBAC-role-management
As the changes to the test code resulting from the RBAC schema update have already been merged into the main branch, I don’t think we need to cover them in this PR.
444c84b to
d223d37
Compare
6c672c8 to
476ff80
Compare
d223d37 to
aa7fa8e
Compare
|
Addressed feedback from @ironAiken2: the RBAC schema-alignment changes referenced in the review body (from #6882) were already merged to main and are not part of this PR's diff — no action needed here. |
aa7fa8e to
342c0ad
Compare
68c2b2f to
ad1c94d
Compare
342c0ad to
00a4c36
Compare
00a4c36 to
3b46628
Compare
ad1c94d to
605faec
Compare
|
I think this is for |
Resolves [FR-2646](https://lablup.atlassian.net/browse/FR-2646) — GraphQL schema update broke `RoleDetailDrawer`. ## Summary The backend schema update changed `RoleAssignmentFilter.roleId` from `UUID` to `UUIDFilter`. This: 1. Broke TypeScript compile in `RoleDetailDrawer.tsx` (`error TS2559`). 2. Introduced a latent runtime failure in `RoleAssignmentTab.tsx` refetch path (TypeScript missed it because `GraphQLFilter` is typed `[key: string]: any`). 3. Surfaced a related server-side validation error when loading the role detail drawer: `Fields "adminRole" conflict because they have differing arguments.` — caused by `RoleScopeTabFragment` and the parent query both calling `adminRole(id: …)` at the top level. ## Changes - **`data/schema.graphql`** — sync with backend 26.4.3+ (`RoleAssignmentFilter.roleId` → `UUIDFilter`, plus new `projectId`/`createdUserId`/`imageId`/`modelVfolderId` filter fields on unrelated inputs). - **`react/src/components/RoleDetailDrawer.tsx`** — wrap `roleId` in `{ equals: localRoleId }` so it conforms to the new `UUIDFilter` type. - **`react/src/components/RoleAssignmentTab.tsx`** — same wrap in the refetch path. - **`react/src/components/RoleScopeTab.tsx`** — alias the inner `adminRole(id: $roleId)` to `scopeRole: adminRole(id: $roleId)` so the server validator stops flagging it as conflicting with the outer `adminRole(id: $id)` call. Two data-access sites (`data.adminRole` → `data.scopeRole`) updated accordingly. ## Verification - `bash scripts/verify.sh` → `=== ALL PASS ===` - Relay compile regenerates `RoleDetailDrawerQuery` with the two calls differentiated: outer `adminRole(id: $id)` and inner `scopeRole: adminRole(id: $id)`. - Role detail drawer opens without the `"Fields adminRole conflict"` validation error from the backend. ## Checklist - [x] Documentation: N/A (bug fix, no user-facing behavior change) - [x] Minimum required manager version: needs manager exposing the updated schema (26.4.3+) - [x] Specific setting for review: open any role in `/rbac` and verify the detail drawer loads - [x] Minimum requirements to check during review: TypeScript passes; role detail drawer loads without GraphQL validation error - [x] Test case(s): existing `e2e/rbac/rbac-role-detail.spec.ts` (currently `test.fixme`d pending separate work) exercises this flow [FR-2646]: https://lablup.atlassian.net/browse/FR-2646?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
605faec to
8178dc1
Compare
3b46628 to
fd4eab0
Compare


Resolves #6884(FR-2651)
Problem
On
/admin-serving?tab=model-store, clicking Create Model Card opens a modal whose model-storage folder picker is scoped to the currently active project. Since this is a platform-admin operation, switching projects should not hide model-store folders that belong to other projects — but today it does.Fix
In
AdminModelCardSettingModal.tsx, stop passingcurrentProjectIdtoBAIVFolderSelectso the underlyingvfolder_nodesquery usesscopeId: undefined(system-wide) instead ofscopeId: project:{id}. Also addusage_mode == "model"to the filter so only model-mode folders are listed, preserving the existingownership_type == "group"constraint.This matches the precedent in
LegacyModelTryContentButton.tsx, which queries model-storage folders without a project scope and with ausage_mode == "model"filter.Scope
Data-scope fix only — no visual/UI change. No screenshots needed; the change is a query-variable adjustment.
Acceptance Criteria
usage_mode == "model"are listed.ownership_type == "group"filtering behavior is preserved.Verification
bash scripts/verify.sh→=== ALL PASS ===(Relay, Lint, Format, TypeScript).