import type { DeployCallbacks } from "../../types/callbacks.js"; import type { DeployParams, DeployResult } from "../../types/params.js"; import type { DeployServices } from "../serviceFactory.js"; import type { StepOutcome } from "../stepLifecycle.js"; import type { RollbackNotHeldError } from "./rollbackNotHeldError.js"; import type { RollbackRestoreSet } from "./rollbackRestore.js"; export type RollbackHold = { readonly kind: "reconciled"; } | { readonly kind: "held"; } | { readonly kind: "not-held"; readonly error: RollbackNotHeldError; } | { readonly kind: "cancelled"; }; /** An image key and the tag rolled to it: a service's name, or a function's image key. */ export interface RolledImageKey { readonly serviceName: string; readonly imageTag: string; } export interface RollbackHoldInput { readonly appName: string; /** The image keys whose parameters the reconcile sets. */ readonly rolledKeys: readonly RolledImageKey[]; /** What the lane rolled, which the hold may put back. */ readonly restoreSet: RollbackRestoreSet; } export interface RollbackHoldContext { readonly callbacks: DeployCallbacks; readonly abortSignal: AbortSignal | undefined; readonly assertLeaseForStack: DeployParams["assertLeaseForStack"]; } /** * Reconcile the Compute stack's image-tag parameters to the tags the rollout * rolled and, when CloudFormation does not complete that update, hold the * rollout to its images. Nothing after the reconcile runs before its ECS tail * has settled, and nothing is written while the stack is mid-operation: * CloudFormation's own UpdateService would race the write. What decides is * read (the caller's cancel, the stack, its events, ECS and Lambda), never * how the reconcile's failure was classed. */ export declare function holdRollback(services: DeployServices, input: RollbackHoldInput, context: RollbackHoldContext): Promise; /** * The rollout's result once its hold settled. A reconciled or held rollback * keeps the lane's own result, its failure included. One that did not hold * fails with the hold's error, joined to the lane's own failure when there is * one and kept on the cause chain, where the deploy's classifier reads it. A * cancelled hold is a cancel. */ export declare function rollbackOutcome(hold: RollbackHold, lane: StepOutcome): StepOutcome;