fix(FR-3037): version-gate project folder creation for managers without createVFolderInProject#7727
fix(FR-3037): version-gate project folder creation for managers without createVFolderInProject#7727nowgnuesLee wants to merge 1 commit into
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. |
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
13b2d94 to
75481a5
Compare
There was a problem hiding this comment.
Pull request overview
This PR restores compatibility with Manager 26.4.3 by version-gating the project folder creation path: it uses the newer project-scoped GraphQL mutation only when the connected Manager is new enough, and otherwise falls back to the long-standing createVfolderV2 mutation (with projectId set) to keep project folder creation working.
Changes:
- Add a new Backend.AI client capability flag (
vfolder-create-in-scope) gated on Manager version>= 26.4.4rc6. - Branch
FolderCreateModalV2’s create flow to usecreateVFolderInProjectonly when the capability is available; otherwise usecreateVfolderV2withprojectIdfor project-owned folders.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| react/src/components/FolderCreateModalV2.tsx | Adds capability-gated branching between createVFolderInProject and the createVfolderV2 fallback (with projectId). |
| packages/backend.ai-client/src/client.ts | Introduces the vfolder-create-in-scope feature flag, enabled on Manager versions >= 26.4.4rc6. |
agatha197
left a comment
There was a problem hiding this comment.
Please check copilot reviews and resolve merge conflicts
…ut createVFolderInProject
75481a5 to
70178bc
Compare

Resolves #7713 (FR-3037)
Problem
On
main, creating a project folder from the admin/project Data page calls the GraphQL mutationcreateVFolderInProject(inputCreateVFolderInScopeInput). Both symbols are Added in UNRELEASED and do not exist in Manager 26.4.3, so the whole operation failsGRAPHQL_VALIDATION_FAILEDand project folder creation is fully broken on 26.4.3.Fix
Version-gate the project-scoped mutation and fall back to the long-standing
createVfolderV2on older managers:packages/backend.ai-client/src/client.ts— add capability flagvfolder-create-in-scope, gated atisManagerVersionCompatibleWith('26.4.4rc6'), mirroring the existing rc4/rc6 precedents (rbac-element-type-filter,user-v2-extended-filter) in the same function.react/src/components/FolderCreateModalV2.tsx—handleOkbranches:isProjectFolder && supports('vfolder-create-in-scope')→createVFolderInProject(enum-typed input), unchanged behavior on new managers.createVfolderV2(Added in 26.4.2, present in 26.4.3) withprojectIdset for project folders.CreateVFolderV2Input.projectIdexists since 26.4.2, so this creates a project-owned vfolder on 26.4.3.createVfolderV2's lowercaseusageMode/permissionstrings and the new path'sGENERAL/READ_WRITEenums both map the UI's options correctly. Merely declaring thecreateVFolderInProjectmutation hook is safe on 26.4.3 — the operation is only sent when committed, which the branch guards.Notes
26.4.4rc6errs intentionally high — the fallback is functionally equivalent and valid on any manager>= 26.4.2, so gating slightly above the real landing version only routes a few versions through the (working) fallback.createVFolderInProjectships in 26.4.4 final (same release as the rc6 user filters) so the gate can't mis-fire on a released manager lacking the symbol.Verification
bash scripts/verify.sh— Relay / Lint (0 errors) / Format / TypeScript all PASS. (The pre-existing "Vite warmup paths" check fails on cleanmaintoo — unrelated to this change.)Live verification against a 26.4.3 manager was not run from this environment (test manager 10.82.0.223 unreachable here).