Skip to content

Drive custom-deployment model-definition placeholders from RuntimeVariant.readsVfolderConfigFiles + defaultModelDefinition #8323

Description

@agatha197

Backend PR lablup/backend.ai#12970 (BA-6942, manager 26.8.0) exposes two new fields on the GraphQL RuntimeVariant type: readsVfolderConfigFiles: Boolean! and defaultModelDefinition: RuntimeVariantModelDefinition!. This resolves the existing TODO(FR-3205) in DeploymentAddRevisionModal.tsx (~line 1456) that deferred this work until the backend exposed these fields.

Goal: replace the hardcoded variantName === 'custom' heuristic in the deployment add-revision flow with the semantic readsVfolderConfigFiles, and drive the custom command/service placeholders from a two-layer merge.

Changes

  • Add cheap readsVfolderConfigFiles boolean to BAIRuntimeVariantSelect's point-lookup and paginated queries; widen the resolved-variant callback so the modal map carries { name, readsVfolderConfigFiles }.
  • Fetch the heavier defaultModelDefinition via a modal-owned side query keyed on the selected runtime variant id (parallel to how the vfolder yaml read is keyed on the selected model folder), so it never bloats the shared select payload.
  • Placeholder precedence (display-only hints): DB defaultModelDefinition (baseline) overridden field-by-field by the vfolder model-definition.yaml (kept via the existing client-side read), then the user's own input on top.
  • Migrate the custom gates (runtime-param preset hide, service-config section show, submit branch, placeholder enablement, warning validator) to readsVfolderConfigFiles; leave the modal-mode Preset/Custom toggle name/mode based.
  • command is a plain String (deprecated start_command surfaced via alias); surface it as the raw string with NO re-tokenization, consistent with the FR-3205 stop-tokenizing principle.

UX constraint: Model Definition File Path lives in the Advanced section, below the command/service fields. Its value must NOT feed back into placeholder computation — placeholders are computed only from the DB default plus the fixed-convention vfolder model-definition.yaml. Having a lower Advanced field change the hints of fields above it is awkward UX and is explicitly excluded.

Version gate: @since(version: "26.8.0") on both new fields; no new client.ts capability flag (both fields are read with a fallback: readsVfolderConfigFiles ?? (name === 'custom'), defaultModelDefinition ?? null). Pin to the first real pre-release tag string if the field ships in an rc before GA (PEP440 rc < final trap).

Blocked on: data/schema.graphql must be synced with #12970's new RuntimeVariant fields before pnpm relay compiles. Ship as a stacked follow-up on top of the FR-3205 PR.

Out of scope: admin deployment preset command/model-path placeholder hints (separate follow-up); extending ParsedModelDefinition with interval/maxWaitTime/expectedStatusCode health-check hints (optional trailing scope).

JIRA Issue: FR-3342

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions