mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 16:02:50 +00:00
Copies the private repository's relay side: the IAM-only fence broker, the operations console and incident monitor, the relay Terraform root with its backend configuration and tfvars, and the deploy/capacity/admission/rehome/ monitoring scripts the workflows call, with their contract tests, contracts, and fixtures. The foundation and apps Terraform roots and the API and auth services stay private. Four surfaces that spanned both trees are narrowed to the relay side rather than left with a dangling read: the infra runner and the root-partition and workload-identity-condition renderers now declare only the relay root, and the Cloud SQL rollout census drops the six app workflows that are not here.
30 lines
869 B
JavaScript
30 lines
869 B
JavaScript
export async function proveRelayLoadPlacementBoundary({ peer, failureReason }) {
|
|
let connected = false
|
|
try {
|
|
await peer.connect()
|
|
connected = true
|
|
} catch (error) {
|
|
const reason = failureReason(error)
|
|
if (reason !== 'assignment_capacity_exhausted') {
|
|
throw new Error(`placement overflow was not rejected: ${reason}`)
|
|
}
|
|
return reason
|
|
} finally {
|
|
await peer.shutdown()
|
|
}
|
|
if (connected) throw new Error('placement overflow unexpectedly connected')
|
|
}
|
|
|
|
export async function proveRelayLoadRegionalFallback({ peer, blockedOrigin }) {
|
|
try {
|
|
await peer.connect()
|
|
const assignedOrigin = peer.assignedCellUrl()
|
|
if (!assignedOrigin || assignedOrigin === blockedOrigin) {
|
|
throw new Error('regional fallback did not leave the full preferred cell')
|
|
}
|
|
return true
|
|
} finally {
|
|
await peer.shutdown()
|
|
}
|
|
}
|