Skip to content

Clarify backend contract: modelStoreProjectId vs selected folder's owning group in Create Model Card #6889

@agatha197

Description

@agatha197

Context

Follow-up from FR-2651 / PR #6888. The Create Model Card modal on /admin-serving?tab=model-store now lists model-store folders across all projects (admin-scope). However, the create mutation at react/src/components/AdminModelCardSettingModal.tsx:253 still passes modelStoreProjectId: currentProject.id!, which may no longer match the owning group of the selected folder.

Question for backend

Which of the following is the contract?

  • (a) Backend re-derives the model card's project from the selected vfolder and modelStoreProjectId is effectively ignored. → Frontend can drop the field or send the folder's owning group.
  • (b) Backend strictly binds the model card to modelStoreProjectId, even when the folder's owning group differs. → Admins picking "any folder" from a non-MODEL_STORE project could create a misaligned record.

Proposed action

  1. Confirm (a) vs. (b) with backend.
  2. If (b): resolve modelStoreProjectId from the selected folder's group (augment BAIVFolderSelect's return shape or query the folder's group post-selection), or enforce the existing Popconfirm flow ("switch to MODEL_STORE project first") on the submit path as well — not just the + Create Folder button.

References

JIRA Issue: FR-2653

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions