Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -9725,6 +9725,14 @@ type ModelRevision implements Node

"""Added in 26.4.2. Resource slot allocations for this revision."""
resourceSlots(filter: AllocatedResourceSlotFilter = null, orderBy: [AllocatedResourceSlotOrderBy!] = null): [AllocatedResourceSlot!]

"""Added in UNRELEASED. ID of the parent deployment this revision belongs to."""
deploymentId: ID!

"""
Added in UNRELEASED. The parent deployment this revision belongs to, resolved via DataLoader.
"""
deployment: ModelDeployment
}

"""Added in 25.19.0. Connection for model revisions."""
Expand Down
81 changes: 20 additions & 61 deletions react/src/components/DeploymentAddRevisionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,13 @@ const DeploymentAddRevisionModal: React.FC<DeploymentAddRevisionModalProps> = ({
return preset;
};

// The `revision.deployment` selection (added in BA-6056) lets the mutation
// update the parent deployment record in the Relay store atomically — so
// row tags in the revision history table and the Configuration Section's
// "current / deploying" panels stay consistent without a manual refresh.
// `currentRevisionId` / `deployingRevisionId` aren't in any deployment
// fragment yet (DeploymentRevisionHistoryTab reads them inline), so they
// are selected explicitly here.
const [commitAdd, isAddInFlight] =
useMutation<DeploymentAddRevisionModalAddMutation>(graphql`
mutation DeploymentAddRevisionModalAddMutation(
Expand All @@ -467,67 +474,18 @@ const DeploymentAddRevisionModal: React.FC<DeploymentAddRevisionModalProps> = ({
addModelRevision(input: $input) {
revision {
id
clusterConfig {
mode
size
}
resourceConfig {
resourceOpts {
entries {
name
value
}
}
}
resourceSlots {
slotName
quantity
}
modelRuntimeConfig {
runtimeVariantId
environ {
entries {
name
value
}
}
}
modelMountConfig {
vfolderId
mountDestination
definitionPath
}
extraMounts {
vfolderId
mountDestination
}
modelDefinition {
models {
name
modelPath
service {
preStartActions {
action
args
}
startCommand
shell
port
healthCheck {
interval
path
maxRetries
maxWaitTime
expectedStatusCode
initialDelay
}
}
}
}
imageV2 {
...DeploymentRevisionDetail_revision
deployment @since(version: "26.4.4") {
id
identity {
canonicalName
currentRevisionId
deployingRevisionId
currentRevision @since(version: "26.4.3") {
id
...DeploymentRevisionDetail_revision
}
deployingRevision @since(version: "26.4.3") {
id
...DeploymentRevisionDetail_revision
}
}
}
Expand Down Expand Up @@ -1201,7 +1159,7 @@ const DeploymentAddRevisionModal: React.FC<DeploymentAddRevisionModalProps> = ({
direction="row"
align="center"
justify="between"
gap="sm"
gap="md"
wrap="wrap"
style={{ paddingRight: token.paddingLG }}
>
Expand All @@ -1213,6 +1171,7 @@ const DeploymentAddRevisionModal: React.FC<DeploymentAddRevisionModalProps> = ({
{ label: t('deployment.PresetMode'), value: 'preset' },
{ label: t('deployment.CustomMode'), value: 'custom' },
]}
style={{ fontWeight: 'normal' }}
/>
</BAIFlex>
}
Expand Down
8 changes: 7 additions & 1 deletion react/src/components/DeploymentRevisionHistoryTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,14 @@ const DeploymentRevisionHistoryTab: React.FC<
deployment {
id
currentRevisionId
currentRevision {
deployingRevisionId
currentRevision @since(version: "26.4.3") {
id
...DeploymentRevisionDetail_revision
}
deployingRevision @since(version: "26.4.3") {
id
...DeploymentRevisionDetail_revision
}
}
previousRevisionId
Expand Down
Loading