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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Updates the Admin deployment revision preset form to compile and behave correctly after the 26.7.0 schema change that makes ModelServiceConfig.shell nullable, while syncing the repo’s GraphQL schema and Relay artifacts.
Changes:
- Sync
data/schema.graphqlto 26.7.0 and regenerate Relay artifacts. - Make
ModelServiceFormValue.shelloptional and normalizenull → undefinedwhen prefilling edit-mode values. - Allow the shell field to be left blank in the form and omit it from submit payloads.
Reviewed changes
Copilot reviewed 5 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| react/src/pages/AdminDeploymentPresetSettingPage.tsx | Normalizes submitted shell when building the model-definition mutation input. |
| react/src/components/AdminDeploymentPresetSettingPageContent.tsx | Normalizes edit-mode initial values (shell: null → undefined). |
| react/src/components/AdminDeploymentPresetModelConfigItem.tsx | Removes the required validation rule for the shell form item. |
| react/src/components/AdminDeploymentPresetFormTypes.ts | Makes ModelServiceFormValue.shell optional and updates related type docs. |
| react/src/generated/VFolderDeployModalQuery.graphql.ts | Relay artifact regenerated after schema sync. |
| react/src/generated/useCurrentUserProjectRolesQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/ScopedAuditLogQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleScopeTabRefetchQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleScopeTabFragment.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RolePermissionTabRefetchQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RolePermissionTabFragment.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleNodesFragment.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleFormModalPermissionMatrixQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleFormModalCreateMutation.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleDetailDrawerQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleAssignmentTabRefetchQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/RoleAssignmentTab_roleScopeFragment.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/ModelCardDrawerQuery.graphql.ts | Relay artifact regenerated after schema sync (presetValues type rename). |
| react/src/generated/DeploymentSettingModalCreateMutation.graphql.ts | Relay artifact regenerated after schema sync (command added to service input). |
| react/src/generated/DeploymentRevisionDetail_revision.graphql.ts | Relay artifact regenerated after schema sync (shell becomes nullable). |
| react/src/generated/DeploymentPresetDetailModalFragment.graphql.ts | Relay artifact regenerated after schema sync (presetValues type rename). |
| react/src/generated/DeploymentAddRevisionModalPresetDetailQuery.graphql.ts | Relay artifact regenerated after schema sync (presetValues type rename). |
| react/src/generated/DeploymentAddRevisionModalAddMutation.graphql.ts | Relay artifact regenerated after schema sync (command added to service input). |
| react/src/generated/CreatePermissionModalUpdateMutation.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/CreatePermissionModalPermissionMatrixQuery.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/CreatePermissionModalCreateMutation.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/CreatePermissionModal_roleScopeFragment.graphql.ts | Relay artifact regenerated after schema sync (RBAC enum updates). |
| react/src/generated/AdminDeploymentPresetSettingPageUpdateMutation.graphql.ts | Relay artifact regenerated after schema sync (command, presetValues type rename). |
| react/src/generated/AdminDeploymentPresetSettingPagePresetQuery.graphql.ts | Relay artifact regenerated after schema sync (presetValues type rename). |
| react/src/generated/AdminDeploymentPresetSettingPageCreateMutation.graphql.ts | Relay artifact regenerated after schema sync (command, startCommand optional, presetValues type rename). |
| react/src/generated/AdminDeploymentPresetSettingPageContent_preset.graphql.ts | Relay artifact regenerated after schema sync (shell becomes nullable, presetValues type rename). |
| data/schema.graphql | Syncs the schema to 26.7.0 (nullable shell, new command, RBAC additions, presetValues type rename, etc.). |
Files not reviewed (27)
- react/src/generated/AdminDeploymentPresetSettingPageContent_preset.graphql.ts: Generated file
- react/src/generated/AdminDeploymentPresetSettingPageCreateMutation.graphql.ts: Generated file
- react/src/generated/AdminDeploymentPresetSettingPagePresetQuery.graphql.ts: Generated file
- react/src/generated/AdminDeploymentPresetSettingPageUpdateMutation.graphql.ts: Generated file
- react/src/generated/CreatePermissionModalCreateMutation.graphql.ts: Generated file
- react/src/generated/CreatePermissionModalPermissionMatrixQuery.graphql.ts: Generated file
- react/src/generated/CreatePermissionModalUpdateMutation.graphql.ts: Generated file
- react/src/generated/CreatePermissionModal_roleScopeFragment.graphql.ts: Generated file
- react/src/generated/DeploymentAddRevisionModalAddMutation.graphql.ts: Generated file
- react/src/generated/DeploymentAddRevisionModalPresetDetailQuery.graphql.ts: Generated file
- react/src/generated/DeploymentPresetDetailModalFragment.graphql.ts: Generated file
- react/src/generated/DeploymentRevisionDetail_revision.graphql.ts: Generated file
- react/src/generated/DeploymentSettingModalCreateMutation.graphql.ts: Generated file
- react/src/generated/ModelCardDrawerQuery.graphql.ts: Generated file
- react/src/generated/RoleAssignmentTabRefetchQuery.graphql.ts: Generated file
- react/src/generated/RoleAssignmentTab_roleScopeFragment.graphql.ts: Generated file
- react/src/generated/RoleDetailDrawerQuery.graphql.ts: Generated file
- react/src/generated/RoleFormModalCreateMutation.graphql.ts: Generated file
- react/src/generated/RoleFormModalPermissionMatrixQuery.graphql.ts: Generated file
- react/src/generated/RoleNodesFragment.graphql.ts: Generated file
- react/src/generated/RolePermissionTabFragment.graphql.ts: Generated file
- react/src/generated/RolePermissionTabRefetchQuery.graphql.ts: Generated file
- react/src/generated/RoleScopeTabFragment.graphql.ts: Generated file
- react/src/generated/RoleScopeTabRefetchQuery.graphql.ts: Generated file
- react/src/generated/ScopedAuditLogQuery.graphql.ts: Generated file
- react/src/generated/VFolderDeployModalQuery.graphql.ts: Generated file
- react/src/generated/useCurrentUserProjectRolesQuery.graphql.ts: Generated file
…ion preset form Adopt the 26.7.0 GraphQL schema, which relaxes the model service `shell` field on the output type from `String!` to `String` (nullable) — backend.ai #12418 / BA-6551, which also adds a single-string `command` field and deprecates the `startCommand` list. Update the deployment revision preset form to preserve that nullability instead of coercing a blank shell to an empty string. - ModelServiceFormValue.shell -> optional (string | undefined; never null, so the shared submit object stays assignable to the create input, whose PresetModelServiceConfigInput.shell forbids null). - Edit-mode initial values normalize null -> undefined so the field shows blank and can be cleared. - Submit normalizes a blank shell to undefined (omit), never '': create falls back to the server default /bin/bash, and update — which replaces the model definition wholesale (backend TriState[ModelDefinition]) — stores null, clearing any previous shell. - Drop the required rule on the shell form item so it can be left blank. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Resolves #8059 (FR-3221)
Problem
The 26.7.0 GraphQL schema (backend.ai #12418 / BA-6551) relaxes the model service
shellfield on the output typeModelServiceConfig.shellfromString!toString(nullable) — the same PR adds a single-stringcommandfield and deprecates thestartCommandlist. After syncing the schema, the deployment revision preset form failed to compile:because the edit-mode initial values map
m.service.shell(now nullable) intoModelServiceFormValue.shell(typedstring).Approach
Preserve the nullability honestly instead of coercing a blank shell to an empty string. The same
buildModelDefinitionInputobject feeds both mutations, and their generated input types differ:PresetModelServiceConfigInput.shell→shell?: string(optional, forbids null; omitting applies the server default/bin/bash).ModelServiceConfigInput.shell→shell?: string | null(nullable).So the form value is kept as
string | undefined(nevernull) so it stays assignable to both. Clearing the field omitsshell; because the update mutation replacesmodel_definitionwholesale (backendTriState[ModelDefinition]) and the service inputshelldefaults to null, an omitted shell is stored as null — i.e. the previous value is cleared./bin/bash; update →null(cleared)A blank (empty or whitespace-only) shell is normalized to
undefined;''/' 'are never sent.Changes
data/schema.graphqland regenerate Relay artifacts (pnpm relay).ModelServiceFormValue.shell→ optional (string | undefined).null → undefined(AdminDeploymentPresetSettingPageContent.tsx).service.shell?.trim() || undefined) to omit (AdminDeploymentPresetSettingPage.tsx).requiredrule on the shell form item so it can be left blank (AdminDeploymentPresetModelConfigItem.tsx).Screenshot
The model service fields on the preset form — Shell now carries the
(optional)marker, while the still-requiredPortandStart Commanddo not:Verification
bash scripts/verify.sh→=== ALL PASS ===🤖 Generated with Claude Code