@shipfox/api-workflows 12.1.0 → 12.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +45 -0
- package/README.md +20 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +56 -0
- package/dist/config.js.map +1 -0
- package/dist/core/entities/job.d.ts +1 -1
- package/dist/core/entities/job.d.ts.map +1 -1
- package/dist/core/entities/step.d.ts +2 -2
- package/dist/core/entities/step.d.ts.map +1 -1
- package/dist/core/errors.d.ts +18 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +21 -2
- package/dist/core/errors.js.map +1 -1
- package/dist/core/step-config/assemble-run-context.d.ts +15 -5
- package/dist/core/step-config/assemble-run-context.d.ts.map +1 -1
- package/dist/core/step-config/assemble-run-context.js +77 -27
- package/dist/core/step-config/assemble-run-context.js.map +1 -1
- package/dist/core/step-config/fields.d.ts +5 -0
- package/dist/core/step-config/fields.d.ts.map +1 -1
- package/dist/core/step-config/fields.js +21 -3
- package/dist/core/step-config/fields.js.map +1 -1
- package/dist/core/step-config/index.d.ts +1 -1
- package/dist/core/step-config/index.d.ts.map +1 -1
- package/dist/core/step-config/index.js +1 -1
- package/dist/core/step-config/index.js.map +1 -1
- package/dist/core/step-config/job-output-limits.d.ts +11 -0
- package/dist/core/step-config/job-output-limits.d.ts.map +1 -0
- package/dist/core/step-config/job-output-limits.js +88 -0
- package/dist/core/step-config/job-output-limits.js.map +1 -0
- package/dist/core/step-config/materialize-workflow-model.d.ts +1 -1
- package/dist/core/step-config/materialize-workflow-model.d.ts.map +1 -1
- package/dist/core/step-config/materialize-workflow-model.js +47 -18
- package/dist/core/step-config/materialize-workflow-model.js.map +1 -1
- package/dist/db/db.d.ts +50 -50
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/index.js.map +1 -1
- package/dist/db/job-listeners.d.ts.map +1 -1
- package/dist/db/job-listeners.js +6 -5
- package/dist/db/job-listeners.js.map +1 -1
- package/dist/db/schema/job-executions.d.ts +3 -3
- package/dist/db/schema/job-listener-events.d.ts +1 -1
- package/dist/db/schema/jobs.d.ts +7 -7
- package/dist/db/schema/outbox.d.ts +1 -1
- package/dist/db/schema/step-attempts.d.ts +2 -2
- package/dist/db/schema/steps.d.ts +5 -5
- package/dist/db/schema/workflow-run-attempts.d.ts +3 -3
- package/dist/db/schema/workflow-run-counters.d.ts +1 -1
- package/dist/db/schema/workflow-runs.d.ts +2 -2
- package/dist/db/workflow-runs/job-executions.d.ts.map +1 -1
- package/dist/db/workflow-runs/job-executions.js +4 -2
- package/dist/db/workflow-runs/job-executions.js.map +1 -1
- package/dist/db/workflow-runs/jobs.d.ts.map +1 -1
- package/dist/db/workflow-runs/jobs.js +33 -3
- package/dist/db/workflow-runs/jobs.js.map +1 -1
- package/dist/db/workflow-runs/outbox.d.ts +1 -0
- package/dist/db/workflow-runs/outbox.d.ts.map +1 -1
- package/dist/db/workflow-runs/outbox.js +1 -0
- package/dist/db/workflow-runs/outbox.js.map +1 -1
- package/dist/db/workflow-runs/steps.d.ts +28 -0
- package/dist/db/workflow-runs/steps.d.ts.map +1 -1
- package/dist/db/workflow-runs/steps.js +49 -1
- package/dist/db/workflow-runs/steps.js.map +1 -1
- package/dist/db/workflow-runs.d.ts +2 -2
- package/dist/db/workflow-runs.d.ts.map +1 -1
- package/dist/db/workflow-runs.js +1 -1
- package/dist/db/workflow-runs.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/metrics/instance.d.ts +1 -0
- package/dist/metrics/instance.d.ts.map +1 -1
- package/dist/metrics/instance.js +8 -0
- package/dist/metrics/instance.js.map +1 -1
- package/dist/presentation/dto/evaluation-trace.d.ts +4 -0
- package/dist/presentation/dto/evaluation-trace.d.ts.map +1 -0
- package/dist/presentation/dto/evaluation-trace.js +39 -0
- package/dist/presentation/dto/evaluation-trace.js.map +1 -0
- package/dist/presentation/dto/index.d.ts +2 -1
- package/dist/presentation/dto/index.d.ts.map +1 -1
- package/dist/presentation/dto/index.js +2 -1
- package/dist/presentation/dto/index.js.map +1 -1
- package/dist/presentation/dto/job.d.ts.map +1 -1
- package/dist/presentation/dto/job.js +6 -0
- package/dist/presentation/dto/job.js.map +1 -1
- package/dist/presentation/dto/step.d.ts +2 -1
- package/dist/presentation/dto/step.d.ts.map +1 -1
- package/dist/presentation/dto/step.js +12 -0
- package/dist/presentation/dto/step.js.map +1 -1
- package/dist/presentation/index.d.ts +1 -1
- package/dist/presentation/index.d.ts.map +1 -1
- package/dist/presentation/index.js +1 -1
- package/dist/presentation/index.js.map +1 -1
- package/dist/presentation/routes/get-step-attempt-detail.d.ts +3 -0
- package/dist/presentation/routes/get-step-attempt-detail.d.ts.map +1 -0
- package/dist/presentation/routes/get-step-attempt-detail.js +38 -0
- package/dist/presentation/routes/get-step-attempt-detail.js.map +1 -0
- package/dist/presentation/routes/index.d.ts.map +1 -1
- package/dist/presentation/routes/index.js +2 -0
- package/dist/presentation/routes/index.js.map +1 -1
- package/dist/presentation/routes/project-access.d.ts +1 -1
- package/dist/presentation/subscribers/index.d.ts +1 -0
- package/dist/presentation/subscribers/index.d.ts.map +1 -1
- package/dist/presentation/subscribers/index.js +1 -0
- package/dist/presentation/subscribers/index.js.map +1 -1
- package/dist/presentation/subscribers/on-failure-annotations.d.ts +5 -0
- package/dist/presentation/subscribers/on-failure-annotations.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-failure-annotations.js +160 -0
- package/dist/presentation/subscribers/on-failure-annotations.js.map +1 -0
- package/dist/temporal/activities/index.d.ts +1 -1
- package/dist/temporal/activities/index.d.ts.map +1 -1
- package/dist/temporal/activities/orchestration-activities.d.ts +1 -1
- package/dist/temporal/activities/orchestration-activities.d.ts.map +1 -1
- package/dist/temporal/workflows/test-env.d.ts +2 -2
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +18 -16
- package/src/config.test.ts +85 -0
- package/src/config.ts +71 -0
- package/src/core/errors.ts +44 -2
- package/src/core/job-execution.test.ts +1 -0
- package/src/core/step-config/assemble-run-context.test.ts +232 -20
- package/src/core/step-config/assemble-run-context.ts +126 -28
- package/src/core/step-config/fields.ts +42 -3
- package/src/core/step-config/index.ts +2 -0
- package/src/core/step-config/job-output-limits.ts +130 -0
- package/src/core/step-config/materialize-workflow-model.catalog.test.ts +117 -0
- package/src/core/step-config/materialize-workflow-model.test.ts +306 -1
- package/src/core/step-config/materialize-workflow-model.ts +65 -18
- package/src/db/index.ts +4 -0
- package/src/db/job-listeners.ts +14 -3
- package/src/db/workflow-runs/job-executions.test.ts +207 -1
- package/src/db/workflow-runs/job-executions.ts +15 -2
- package/src/db/workflow-runs/job-status.test.ts +10 -3
- package/src/db/workflow-runs/jobs.test.ts +49 -0
- package/src/db/workflow-runs/jobs.ts +53 -6
- package/src/db/workflow-runs/outbox.ts +7 -1
- package/src/db/workflow-runs/run-create.test.ts +56 -0
- package/src/db/workflow-runs/steps.test.ts +148 -0
- package/src/db/workflow-runs/steps.ts +105 -1
- package/src/db/workflow-runs.ts +4 -0
- package/src/index.ts +9 -0
- package/src/metrics/instance.ts +10 -0
- package/src/presentation/dto/evaluation-trace.ts +27 -0
- package/src/presentation/dto/index.ts +2 -1
- package/src/presentation/dto/job.ts +6 -0
- package/src/presentation/dto/step.test.ts +96 -1
- package/src/presentation/dto/step.ts +17 -0
- package/src/presentation/index.ts +2 -0
- package/src/presentation/routes/get-step-attempt-detail.test.ts +159 -0
- package/src/presentation/routes/get-step-attempt-detail.ts +33 -0
- package/src/presentation/routes/index.ts +2 -0
- package/src/presentation/subscribers/index.ts +4 -0
- package/src/presentation/subscribers/on-failure-annotations.test.ts +510 -0
- package/src/presentation/subscribers/on-failure-annotations.ts +237 -0
- package/test/factories/workflow-model.ts +2 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/dto/step.ts"],"sourcesContent":["import {\n agentConfigIssueSchema,\n type StepAttemptDto,\n type StepDto,\n type StepErrorCategoryDto,\n type StepErrorDto,\n type StepGateResultDto,\n stepErrorReasonSchema,\n} from '@shipfox/api-workflows-dto';\nimport type {Step, StepAttempt} from '#core/entities/step.js';\nimport {GATE_EVALUATION_ERROR_REASON} from '#core/step-transition/evaluate-gate.js';\n\n// Domain `error` is loosely typed (jsonb), so narrow it to the fixed runner\n// contract rather than trusting whatever shape the row happens to hold. `category`\n// is not stored on the row; the caller derives it from the step type and passes it\n// in (server-authoritative, never trusted from the runner).\nfunction toStepErrorDto(\n error: Record<string, unknown> | null,\n category: StepErrorCategoryDto,\n): StepErrorDto {\n if (error === null) return null;\n const message = typeof error.message === 'string' ? error.message : '';\n const exitCode = error.exitCode;\n const signal = typeof error.signal === 'string' ? error.signal : undefined;\n const field = typeof error.field === 'string' ? error.field : undefined;\n const source = typeof error.source === 'string' ? error.source : undefined;\n const reason = stepErrorReasonSchema.safeParse(error.reason);\n const agentConfigIssue = agentConfigIssueSchema.safeParse(error.agentConfigIssue);\n return {\n message,\n ...(exitCode === null || typeof exitCode === 'number' ? {exit_code: exitCode} : {}),\n ...(signal === undefined ? {} : {signal}),\n ...(reason.success ? {reason: reason.data} : {}),\n ...(field === undefined ? {} : {field}),\n ...(source === undefined ? {} : {source}),\n ...(agentConfigIssue.success ? {agent_config_issue: agentConfigIssue.data} : {}),\n category,\n };\n}\n\n// Inverse of toStepErrorDto: reported wire errors land on the domain row in\n// camelCase so the read path renders them back without a special case. `category`\n// is intentionally NOT persisted: the server derives it from the step type on\n// read, so a runner-supplied category is ignored here.\nexport function fromStepErrorDto(error: StepErrorDto | undefined): Record<string, unknown> | null {\n if (!error) return null;\n return {\n message: error.message,\n ...(error.exit_code === null || typeof error.exit_code === 'number'\n ? {exitCode: error.exit_code}\n : {}),\n ...(typeof error.signal === 'string' ? {signal: error.signal} : {}),\n ...(error.reason === undefined ? {} : {reason: error.reason}),\n ...(error.field === undefined ? {} : {field: error.field}),\n ...(error.source === undefined ? {} : {source: error.source}),\n ...(error.agent_config_issue === undefined ? {} : {agentConfigIssue: error.agent_config_issue}),\n };\n}\n\nfunction isIntOrNull(value: unknown): value is number | null {\n return value === null || (typeof value === 'number' && Number.isInteger(value));\n}\n\nfunction toStepGateResultDto(\n gateResult: Record<string, unknown> | null,\n status: string,\n): StepGateResultDto {\n if (gateResult === null) {\n return status === 'running' || status === 'pending' ? {kind: 'not_evaluated'} : {kind: 'none'};\n }\n\n const exitCode = gateResult.exit_code;\n const passed = gateResult.passed;\n const source = gateResult.source;\n const reason = gateResult.reason;\n\n if (passed === true && typeof source === 'string' && isIntOrNull(exitCode)) {\n return {kind: 'passed', passed, source, exit_code: exitCode};\n }\n\n if (\n passed === false &&\n gateResult.uncheckable === true &&\n typeof reason === 'string' &&\n isIntOrNull(exitCode)\n ) {\n if (reason === GATE_EVALUATION_ERROR_REASON) {\n return {kind: 'evaluation_error', reason, exit_code: exitCode};\n }\n return {kind: 'uncheckable', passed, uncheckable: true, reason, exit_code: exitCode};\n }\n\n if (passed === false && typeof source === 'string' && isIntOrNull(exitCode)) {\n return {kind: 'failed', passed, source, exit_code: exitCode};\n }\n\n return {kind: 'unknown', data: gateResult};\n}\n\nexport function toStepDto(step: Step): StepDto {\n return {\n id: step.id,\n job_execution_id: step.jobExecutionId,\n key: step.key,\n name: step.name,\n source_location: toStepSourceLocationDto(step.sourceLocation),\n status: step.status,\n type: step.type,\n config: step.config,\n error: toStepErrorDto(\n step.error,\n step.type === 'setup' || step.type === 'checkout' ? 'setup' : 'user',\n ),\n position: step.position,\n current_attempt: step.currentAttempt,\n created_at: step.createdAt.toISOString(),\n updated_at: step.updatedAt.toISOString(),\n };\n}\n\nfunction toStepSourceLocationDto(\n sourceLocation: Step['sourceLocation'],\n): StepDto['source_location'] {\n if (sourceLocation === null) return null;\n return {\n start_line: sourceLocation.startLine,\n end_line: sourceLocation.endLine,\n };\n}\n\nexport function toStepAttemptDto(attempt: StepAttempt): StepAttemptDto {\n return {\n id: attempt.id,\n step_id: attempt.stepId,\n attempt: attempt.attempt,\n execution_order: attempt.executionOrder,\n status: attempt.status,\n exit_code: attempt.exitCode,\n output: attempt.output,\n outputs: attempt.output,\n response: attempt.response,\n error: attempt.error,\n gate_result: toStepGateResultDto(attempt.gateResult, attempt.status),\n restart_feedback: attempt.restartFeedback,\n started_at: attempt.startedAt.toISOString(),\n finished_at: attempt.finishedAt ? attempt.finishedAt.toISOString() : null,\n };\n}\n"],"names":["agentConfigIssueSchema","stepErrorReasonSchema","GATE_EVALUATION_ERROR_REASON","toStepErrorDto","error","category","message","exitCode","signal","undefined","field","source","reason","safeParse","agentConfigIssue","exit_code","success","data","agent_config_issue","fromStepErrorDto","isIntOrNull","value","Number","isInteger","toStepGateResultDto","gateResult","status","kind","passed","uncheckable","toStepDto","step","id","job_execution_id","jobExecutionId","key","name","source_location","toStepSourceLocationDto","sourceLocation","type","config","position","current_attempt","currentAttempt","created_at","createdAt","toISOString","updated_at","updatedAt","start_line","startLine","end_line","endLine","toStepAttemptDto","attempt","step_id","stepId","execution_order","executionOrder","output","outputs","response","gate_result","restart_feedback","restartFeedback","started_at","startedAt","finished_at","finishedAt"],"mappings":"AAAA,SACEA,sBAAsB,EAMtBC,qBAAqB,QAChB,6BAA6B;AAEpC,SAAQC,4BAA4B,QAAO,yCAAyC;AAEpF,4EAA4E;AAC5E,mFAAmF;AACnF,mFAAmF;AACnF,4DAA4D;AAC5D,SAASC,eACPC,KAAqC,EACrCC,QAA8B;IAE9B,IAAID,UAAU,MAAM,OAAO;IAC3B,MAAME,UAAU,OAAOF,MAAME,OAAO,KAAK,WAAWF,MAAME,OAAO,GAAG;IACpE,MAAMC,WAAWH,MAAMG,QAAQ;IAC/B,MAAMC,SAAS,OAAOJ,MAAMI,MAAM,KAAK,WAAWJ,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AAK;IACvE;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/dto/step.ts"],"sourcesContent":["import {\n agentConfigIssueSchema,\n type StepAttemptDetailResponseDto,\n type StepAttemptDto,\n type StepDto,\n type StepErrorCategoryDto,\n type StepErrorDto,\n type StepGateResultDto,\n stepErrorReasonSchema,\n} from '@shipfox/api-workflows-dto';\nimport type {Step, StepAttempt} from '#core/entities/step.js';\nimport {GATE_EVALUATION_ERROR_REASON} from '#core/step-transition/evaluate-gate.js';\nimport {toEvaluationTraceDto} from './evaluation-trace.js';\n\n// Domain `error` is loosely typed (jsonb), so narrow it to the fixed runner\n// contract rather than trusting whatever shape the row happens to hold. `category`\n// is not stored on the row; the caller derives it from the step type and passes it\n// in (server-authoritative, never trusted from the runner).\nfunction toStepErrorDto(\n error: Record<string, unknown> | null,\n category: StepErrorCategoryDto,\n): StepErrorDto {\n if (error === null) return null;\n const message = typeof error.message === 'string' ? error.message : '';\n const exitCode = error.exitCode;\n const signal = typeof error.signal === 'string' ? error.signal : undefined;\n const field = typeof error.field === 'string' ? error.field : undefined;\n const source = typeof error.source === 'string' ? error.source : undefined;\n const reason = stepErrorReasonSchema.safeParse(error.reason);\n const agentConfigIssue = agentConfigIssueSchema.safeParse(error.agentConfigIssue);\n return {\n message,\n ...(exitCode === null || typeof exitCode === 'number' ? {exit_code: exitCode} : {}),\n ...(signal === undefined ? {} : {signal}),\n ...(reason.success ? {reason: reason.data} : {}),\n ...(field === undefined ? {} : {field}),\n ...(source === undefined ? {} : {source}),\n ...(agentConfigIssue.success ? {agent_config_issue: agentConfigIssue.data} : {}),\n category,\n };\n}\n\n// Inverse of toStepErrorDto: reported wire errors land on the domain row in\n// camelCase so the read path renders them back without a special case. `category`\n// is intentionally NOT persisted: the server derives it from the step type on\n// read, so a runner-supplied category is ignored here.\nexport function fromStepErrorDto(error: StepErrorDto | undefined): Record<string, unknown> | null {\n if (!error) return null;\n return {\n message: error.message,\n ...(error.exit_code === null || typeof error.exit_code === 'number'\n ? {exitCode: error.exit_code}\n : {}),\n ...(typeof error.signal === 'string' ? {signal: error.signal} : {}),\n ...(error.reason === undefined ? {} : {reason: error.reason}),\n ...(error.field === undefined ? {} : {field: error.field}),\n ...(error.source === undefined ? {} : {source: error.source}),\n ...(error.agent_config_issue === undefined ? {} : {agentConfigIssue: error.agent_config_issue}),\n };\n}\n\nfunction isIntOrNull(value: unknown): value is number | null {\n return value === null || (typeof value === 'number' && Number.isInteger(value));\n}\n\nfunction toStepGateResultDto(\n gateResult: Record<string, unknown> | null,\n status: string,\n): StepGateResultDto {\n if (gateResult === null) {\n return status === 'running' || status === 'pending' ? {kind: 'not_evaluated'} : {kind: 'none'};\n }\n\n const exitCode = gateResult.exit_code;\n const passed = gateResult.passed;\n const source = gateResult.source;\n const reason = gateResult.reason;\n\n if (passed === true && typeof source === 'string' && isIntOrNull(exitCode)) {\n return {kind: 'passed', passed, source, exit_code: exitCode};\n }\n\n if (\n passed === false &&\n gateResult.uncheckable === true &&\n typeof reason === 'string' &&\n isIntOrNull(exitCode)\n ) {\n if (reason === GATE_EVALUATION_ERROR_REASON) {\n return {kind: 'evaluation_error', reason, exit_code: exitCode};\n }\n return {kind: 'uncheckable', passed, uncheckable: true, reason, exit_code: exitCode};\n }\n\n if (passed === false && typeof source === 'string' && isIntOrNull(exitCode)) {\n return {kind: 'failed', passed, source, exit_code: exitCode};\n }\n\n return {kind: 'unknown', data: gateResult};\n}\n\nexport function toStepDto(step: Step): StepDto {\n return {\n id: step.id,\n job_execution_id: step.jobExecutionId,\n key: step.key,\n name: step.name,\n source_location: toStepSourceLocationDto(step.sourceLocation),\n status: step.status,\n status_reason: step.statusReason,\n type: step.type,\n config: step.config,\n evaluation_trace: toEvaluationTraceDto(step.evaluationTrace),\n error: toStepErrorDto(\n step.error,\n step.type === 'setup' || step.type === 'checkout' ? 'setup' : 'user',\n ),\n position: step.position,\n current_attempt: step.currentAttempt,\n created_at: step.createdAt.toISOString(),\n updated_at: step.updatedAt.toISOString(),\n };\n}\n\nfunction toStepSourceLocationDto(\n sourceLocation: Step['sourceLocation'],\n): StepDto['source_location'] {\n if (sourceLocation === null) return null;\n return {\n start_line: sourceLocation.startLine,\n end_line: sourceLocation.endLine,\n };\n}\n\nexport function toStepAttemptDto(attempt: StepAttempt): StepAttemptDto {\n return {\n id: attempt.id,\n step_id: attempt.stepId,\n attempt: attempt.attempt,\n execution_order: attempt.executionOrder,\n status: attempt.status,\n exit_code: attempt.exitCode,\n output: attempt.output,\n outputs: attempt.output,\n response: attempt.response,\n error: attempt.error,\n gate_result: toStepGateResultDto(attempt.gateResult, attempt.status),\n restart_feedback: attempt.restartFeedback,\n started_at: attempt.startedAt.toISOString(),\n finished_at: attempt.finishedAt ? attempt.finishedAt.toISOString() : null,\n };\n}\n\nexport function toStepAttemptDetailResponseDto(\n step: Step,\n attempt: StepAttempt,\n): StepAttemptDetailResponseDto {\n return {\n step_id: step.id,\n attempt: attempt.attempt,\n authored_config: step.authoredConfig,\n config: attempt.config,\n evaluation_trace: toEvaluationTraceDto(attempt.evaluationTrace),\n };\n}\n"],"names":["agentConfigIssueSchema","stepErrorReasonSchema","GATE_EVALUATION_ERROR_REASON","toEvaluationTraceDto","toStepErrorDto","error","category","message","exitCode","signal","undefined","field","source","reason","safeParse","agentConfigIssue","exit_code","success","data","agent_config_issue","fromStepErrorDto","isIntOrNull","value","Number","isInteger","toStepGateResultDto","gateResult","status","kind","passed","uncheckable","toStepDto","step","id","job_execution_id","jobExecutionId","key","name","source_location","toStepSourceLocationDto","sourceLocation","status_reason","statusReason","type","config","evaluation_trace","evaluationTrace","position","current_attempt","currentAttempt","created_at","createdAt","toISOString","updated_at","updatedAt","start_line","startLine","end_line","endLine","toStepAttemptDto","attempt","step_id","stepId","execution_order","executionOrder","output","outputs","response","gate_result","restart_feedback","restartFeedback","started_at","startedAt","finished_at","finishedAt","toStepAttemptDetailResponseDto","authored_config","authoredConfig"],"mappings":"AAAA,SACEA,sBAAsB,EAOtBC,qB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E;QACd4B,SAASD,QAAQE,MAAM;QACvBF,SAASA,QAAQA,OAAO;QACxBG,iBAAiBH,QAAQI,cAAc;QACvCrC,QAAQiC,QAAQjC,MAAM;QACtBX,WAAW4C,QAAQpD,QAAQ;QAC3ByD,QAAQL,QAAQK,MAAM;QACtBC,SAASN,QAAQK,MAAM;QACvBE,UAAUP,QAAQO,QAAQ;QAC1B9D,OAAOuD,QAAQvD,KAAK;QACpB+D,aAAa3C,oBAAoBmC,QAAQlC,UAAU,EAAEkC,QAAQjC,MAAM;QACnE0C,kBAAkBT,QAAQU,eAAe;QACzCC,YAAYX,QAAQY,SAAS,CAACpB,WAAW;QACzCqB,aAAab,QAAQc,UAAU,GAAGd,QAAQc,UAAU,CAACtB,WAAW,KAAK;IACvE;AACF;AAEA,OAAO,SAASuB,+BACd3C,IAAU,EACV4B,OAAoB;IAEpB,OAAO;QACLC,SAAS7B,KAAKC,EAAE;QAChB2B,SAASA,QAAQA,OAAO;QACxBgB,iBAAiB5C,KAAK6C,cAAc;QACpCjC,QAAQgB,QAAQhB,MAAM;QACtBC,kBAAkB1C,qBAAqByD,QAAQd,eAAe;IAChE;AACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { createWorkflowRoutes } from './routes/index.js';
|
|
2
|
-
export { onJobEventDelivered, onJobStepsSettled, onRunnerJobClaimed, onRunnerJobLeaseExpired, onRunnerJobQueued, onWorkflowRunAttemptCreated, onWorkflowRunCancelled, } from './subscribers/index.js';
|
|
2
|
+
export { onJobEventDelivered, onJobStepsSettled, onJobTerminatedFailureAnnotation, onRunnerJobClaimed, onRunnerJobLeaseExpired, onRunnerJobQueued, onStepAttemptTerminatedFailureAnnotation, onWorkflowRunAttemptCreated, onWorkflowRunCancelled, } from './subscribers/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,gCAAgC,EAChC,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,wCAAwC,EACxC,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createWorkflowRoutes } from './routes/index.js';
|
|
2
|
-
export { onJobEventDelivered, onJobStepsSettled, onRunnerJobClaimed, onRunnerJobLeaseExpired, onRunnerJobQueued, onWorkflowRunAttemptCreated, onWorkflowRunCancelled } from './subscribers/index.js';
|
|
2
|
+
export { onJobEventDelivered, onJobStepsSettled, onJobTerminatedFailureAnnotation, onRunnerJobClaimed, onRunnerJobLeaseExpired, onRunnerJobQueued, onStepAttemptTerminatedFailureAnnotation, onWorkflowRunAttemptCreated, onWorkflowRunCancelled } from './subscribers/index.js';
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/presentation/index.ts"],"sourcesContent":["export {createWorkflowRoutes} from './routes/index.js';\nexport {\n onJobEventDelivered,\n onJobStepsSettled,\n onRunnerJobClaimed,\n onRunnerJobLeaseExpired,\n onRunnerJobQueued,\n onWorkflowRunAttemptCreated,\n onWorkflowRunCancelled,\n} from './subscribers/index.js';\n"],"names":["createWorkflowRoutes","onJobEventDelivered","onJobStepsSettled","onRunnerJobClaimed","onRunnerJobLeaseExpired","onRunnerJobQueued","onWorkflowRunAttemptCreated","onWorkflowRunCancelled"],"mappings":"AAAA,SAAQA,oBAAoB,QAAO,oBAAoB;AACvD,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,kBAAkB,EAClBC,uBAAuB,EACvBC,iBAAiB,EACjBC,2BAA2B,EAC3BC,sBAAsB,QACjB,yBAAyB"}
|
|
1
|
+
{"version":3,"sources":["../../src/presentation/index.ts"],"sourcesContent":["export {createWorkflowRoutes} from './routes/index.js';\nexport {\n onJobEventDelivered,\n onJobStepsSettled,\n onJobTerminatedFailureAnnotation,\n onRunnerJobClaimed,\n onRunnerJobLeaseExpired,\n onRunnerJobQueued,\n onStepAttemptTerminatedFailureAnnotation,\n onWorkflowRunAttemptCreated,\n onWorkflowRunCancelled,\n} from './subscribers/index.js';\n"],"names":["createWorkflowRoutes","onJobEventDelivered","onJobStepsSettled","onJobTerminatedFailureAnnotation","onRunnerJobClaimed","onRunnerJobLeaseExpired","onRunnerJobQueued","onStepAttemptTerminatedFailureAnnotation","onWorkflowRunAttemptCreated","onWorkflowRunCancelled"],"mappings":"AAAA,SAAQA,oBAAoB,QAAO,oBAAoB;AACvD,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,gCAAgC,EAChCC,kBAAkB,EAClBC,uBAAuB,EACvBC,iBAAiB,EACjBC,wCAAwC,EACxCC,2BAA2B,EAC3BC,sBAAsB,QACjB,yBAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-step-attempt-detail.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/get-step-attempt-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AAQjF,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,oBAAoB,mDAwBvE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { stepAttemptDetailResponseSchema } from '@shipfox/api-workflows-dto';
|
|
2
|
+
import { ClientError, defineRoute } from '@shipfox/node-fastify';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { getStepAttemptDetail } from '#db/index.js';
|
|
5
|
+
import { toStepAttemptDetailResponseDto } from '#presentation/dto/step.js';
|
|
6
|
+
import { requireAccessibleRun } from './require-accessible-run.js';
|
|
7
|
+
export function getStepAttemptDetailRoute(projects) {
|
|
8
|
+
return defineRoute({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
path: '/steps/:stepId/attempts/:attempt',
|
|
11
|
+
description: 'Get troubleshooting details for one step attempt',
|
|
12
|
+
schema: {
|
|
13
|
+
params: z.object({
|
|
14
|
+
stepId: z.string().uuid(),
|
|
15
|
+
attempt: z.coerce.number().int().positive()
|
|
16
|
+
}),
|
|
17
|
+
response: {
|
|
18
|
+
200: stepAttemptDetailResponseSchema
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
handler: async (request)=>{
|
|
22
|
+
const detail = await getStepAttemptDetail(request.params);
|
|
23
|
+
if (!detail) {
|
|
24
|
+
throw new ClientError('Step attempt not found', 'not-found', {
|
|
25
|
+
status: 404
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
await requireAccessibleRun({
|
|
29
|
+
request,
|
|
30
|
+
id: detail.workflowRunId,
|
|
31
|
+
projects
|
|
32
|
+
});
|
|
33
|
+
return toStepAttemptDetailResponseDto(detail.step, detail.attempt);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=get-step-attempt-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/routes/get-step-attempt-detail.ts"],"sourcesContent":["import type {ProjectsModuleClient} from '@shipfox/api-projects-dto/inter-module';\nimport {stepAttemptDetailResponseSchema} from '@shipfox/api-workflows-dto';\nimport {ClientError, defineRoute} from '@shipfox/node-fastify';\nimport {z} from 'zod';\nimport {getStepAttemptDetail} from '#db/index.js';\nimport {toStepAttemptDetailResponseDto} from '#presentation/dto/step.js';\nimport {requireAccessibleRun} from './require-accessible-run.js';\n\nexport function getStepAttemptDetailRoute(projects: ProjectsModuleClient) {\n return defineRoute({\n method: 'GET',\n path: '/steps/:stepId/attempts/:attempt',\n description: 'Get troubleshooting details for one step attempt',\n schema: {\n params: z.object({\n stepId: z.string().uuid(),\n attempt: z.coerce.number().int().positive(),\n }),\n response: {\n 200: stepAttemptDetailResponseSchema,\n },\n },\n handler: async (request) => {\n const detail = await getStepAttemptDetail(request.params);\n if (!detail) {\n throw new ClientError('Step attempt not found', 'not-found', {status: 404});\n }\n\n await requireAccessibleRun({request, id: detail.workflowRunId, projects});\n return toStepAttemptDetailResponseDto(detail.step, detail.attempt);\n },\n });\n}\n"],"names":["stepAttemptDetailResponseSchema","ClientError","defineRoute","z","getStepAttemptDetail","toStepAttemptDetailResponseDto","requireAccessibleRun","getStepAttemptDetailRoute","projects","method","path","description","schema","params","object","stepId","string","uuid","attempt","coerce","number","int","positive","response","handler","request","detail","status","id","workflowRunId","step"],"mappings":"AACA,SAAQA,+BAA+B,QAAO,6BAA6B;AAC3E,SAAQC,WAAW,EAAEC,WAAW,QAAO,wBAAwB;AAC/D,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,oBAAoB,QAAO,eAAe;AAClD,SAAQC,8BAA8B,QAAO,4BAA4B;AACzE,SAAQC,oBAAoB,QAAO,8BAA8B;AAEjE,OAAO,SAASC,0BAA0BC,QAA8B;IACtE,OAAON,YAAY;QACjBO,QAAQ;QACRC,MAAM;QACNC,aAAa;QACbC,QAAQ;YACNC,QAAQV,EAAEW,MAAM,CAAC;gBACfC,QAAQZ,EAAEa,MAAM,GAAGC,IAAI;gBACvBC,SAASf,EAAEgB,MAAM,CAACC,MAAM,GAAGC,GAAG,GAAGC,QAAQ;YAC3C;YACAC,UAAU;gBACR,KAAKvB;YACP;QACF;QACAwB,SAAS,OAAOC;YACd,MAAMC,SAAS,MAAMtB,qBAAqBqB,QAAQZ,MAAM;YACxD,IAAI,CAACa,QAAQ;gBACX,MAAM,IAAIzB,YAAY,0BAA0B,aAAa;oBAAC0B,QAAQ;gBAAG;YAC3E;YAEA,MAAMrB,qBAAqB;gBAACmB;gBAASG,IAAIF,OAAOG,aAAa;gBAAErB;YAAQ;YACvE,OAAOH,+BAA+BqB,OAAOI,IAAI,EAAEJ,OAAOR,OAAO;QACnE;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAEhF,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AACjF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAEhF,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AACjF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AActD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,sBAAsB,CAAC;IAC9B,WAAW,EAAE,4BAA4B,CAAC;IAC1C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,YAAY,EAAE,wBAAwB,CAAC;IACvC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,EAAE,wBAAwB,CAAC;IAClC,UAAU,EAAE,2BAA2B,CAAC;CACzC,CAAC;AAEF,KAAK,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;AAEvE,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,sBAAsB,GAAG,UAAU,CAiBrF;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,EAAE,CAiB/E"}
|
|
@@ -4,6 +4,7 @@ import { cancelRunRoute } from './cancel-run.js';
|
|
|
4
4
|
import { createCheckoutTokenRoute } from './checkout-token.js';
|
|
5
5
|
import { getRunRoute } from './get-run.js';
|
|
6
6
|
import { getRunAggregatesRoute } from './get-run-aggregates.js';
|
|
7
|
+
import { getStepAttemptDetailRoute } from './get-step-attempt-detail.js';
|
|
7
8
|
import { createGetStepSecretsRoute } from './get-step-secrets.js';
|
|
8
9
|
import { listRunAttemptsRoute } from './list-run-attempts.js';
|
|
9
10
|
import { listRunsRoute } from './list-runs.js';
|
|
@@ -38,6 +39,7 @@ export function createWorkflowRoutes(params) {
|
|
|
38
39
|
getRunAggregatesRoute(params.projects),
|
|
39
40
|
listRunAttemptsRoute(params.projects),
|
|
40
41
|
getRunRoute(params.projects),
|
|
42
|
+
getStepAttemptDetailRoute(params.projects),
|
|
41
43
|
cancelRunRoute(params.projects),
|
|
42
44
|
rerunRunRoute(params.projects, params.workspaces)
|
|
43
45
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/routes/index.ts"],"sourcesContent":["import type {AnnotationsInterModuleClient} from '@shipfox/annotations-dto/inter-module';\nimport type {AgentInterModuleClient} from '@shipfox/api-agent-dto/inter-module';\nimport {AUTH_LEASED_JOB, AUTH_USER} from '@shipfox/api-auth-context';\nimport type {AuthInterModuleClient} from '@shipfox/api-auth-dto/inter-module';\nimport type {IntegrationsModuleClient} from '@shipfox/api-integration-core-dto/inter-module';\nimport type {ProjectsModuleClient} from '@shipfox/api-projects-dto/inter-module';\nimport type {RunnersInterModuleClient} from '@shipfox/api-runners-dto/inter-module';\nimport type {SecretsInterModuleClient} from '@shipfox/api-secrets-dto/inter-module';\nimport type {WorkspacesInterModuleClient} from '@shipfox/api-workspaces-dto/inter-module';\nimport type {RouteGroup} from '@shipfox/node-fastify';\nimport {createAgentRuntimeConfigRoute} from './agent-runtime-config.js';\nimport {cancelRunRoute} from './cancel-run.js';\nimport {createCheckoutTokenRoute} from './checkout-token.js';\nimport {getRunRoute} from './get-run.js';\nimport {getRunAggregatesRoute} from './get-run-aggregates.js';\nimport {createGetStepSecretsRoute} from './get-step-secrets.js';\nimport {listRunAttemptsRoute} from './list-run-attempts.js';\nimport {listRunsRoute} from './list-runs.js';\nimport {createNextStepRoute} from './next-step.js';\nimport {createReportStepRoute} from './report-step.js';\nimport {rerunRunRoute} from './rerun-run.js';\n\ntype WorkflowRouteClients = {\n agent: AgentInterModuleClient;\n annotations: AnnotationsInterModuleClient;\n auth: AuthInterModuleClient;\n integrations: IntegrationsModuleClient;\n projects: ProjectsModuleClient;\n runners: RunnersInterModuleClient;\n secrets: SecretsInterModuleClient;\n workspaces: WorkspacesInterModuleClient;\n};\n\ntype LeaseTokenRouteClients = Omit<WorkflowRouteClients, 'workspaces'>;\n\nexport function createLeaseTokenRouteGroup(params: LeaseTokenRouteClients): RouteGroup {\n return {\n // The lease token names the job, so the path carries no job id (\"current\").\n prefix: '/runs/jobs/current',\n auth: AUTH_LEASED_JOB,\n routes: [\n createNextStepRoute(params),\n createReportStepRoute(params.runners),\n createCheckoutTokenRoute({\n integrations: params.integrations,\n projects: params.projects,\n runners: params.runners,\n }),\n createAgentRuntimeConfigRoute(params),\n createGetStepSecretsRoute(params.runners, params.secrets),\n ],\n };\n}\n\nexport function createWorkflowRoutes(params: WorkflowRouteClients): RouteGroup[] {\n return [\n {\n prefix: '/workflows/runs',\n auth: AUTH_USER,\n routes: [\n listRunsRoute(params.projects),\n getRunAggregatesRoute(params.projects),\n listRunAttemptsRoute(params.projects),\n getRunRoute(params.projects),\n cancelRunRoute(params.projects),\n rerunRunRoute(params.projects, params.workspaces),\n ],\n },\n createLeaseTokenRouteGroup(params),\n ];\n}\n"],"names":["AUTH_LEASED_JOB","AUTH_USER","createAgentRuntimeConfigRoute","cancelRunRoute","createCheckoutTokenRoute","getRunRoute","getRunAggregatesRoute","createGetStepSecretsRoute","listRunAttemptsRoute","listRunsRoute","createNextStepRoute","createReportStepRoute","rerunRunRoute","createLeaseTokenRouteGroup","params","prefix","auth","routes","runners","integrations","projects","secrets","createWorkflowRoutes","workspaces"],"mappings":"AAEA,SAAQA,eAAe,EAAEC,SAAS,QAAO,4BAA4B;AAQrE,SAAQC,6BAA6B,QAAO,4BAA4B;AACxE,SAAQC,cAAc,QAAO,kBAAkB;AAC/C,SAAQC,wBAAwB,QAAO,sBAAsB;AAC7D,SAAQC,WAAW,QAAO,eAAe;AACzC,SAAQC,qBAAqB,QAAO,0BAA0B;AAC9D,SAAQC,yBAAyB,QAAO,wBAAwB;AAChE,SAAQC,oBAAoB,QAAO,yBAAyB;AAC5D,SAAQC,aAAa,QAAO,iBAAiB;AAC7C,SAAQC,mBAAmB,QAAO,iBAAiB;AACnD,SAAQC,qBAAqB,QAAO,mBAAmB;AACvD,SAAQC,aAAa,QAAO,iBAAiB;AAe7C,OAAO,SAASC,2BAA2BC,MAA8B;IACvE,OAAO;QACL,4EAA4E;QAC5EC,QAAQ;QACRC,
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/routes/index.ts"],"sourcesContent":["import type {AnnotationsInterModuleClient} from '@shipfox/annotations-dto/inter-module';\nimport type {AgentInterModuleClient} from '@shipfox/api-agent-dto/inter-module';\nimport {AUTH_LEASED_JOB, AUTH_USER} from '@shipfox/api-auth-context';\nimport type {AuthInterModuleClient} from '@shipfox/api-auth-dto/inter-module';\nimport type {IntegrationsModuleClient} from '@shipfox/api-integration-core-dto/inter-module';\nimport type {ProjectsModuleClient} from '@shipfox/api-projects-dto/inter-module';\nimport type {RunnersInterModuleClient} from '@shipfox/api-runners-dto/inter-module';\nimport type {SecretsInterModuleClient} from '@shipfox/api-secrets-dto/inter-module';\nimport type {WorkspacesInterModuleClient} from '@shipfox/api-workspaces-dto/inter-module';\nimport type {RouteGroup} from '@shipfox/node-fastify';\nimport {createAgentRuntimeConfigRoute} from './agent-runtime-config.js';\nimport {cancelRunRoute} from './cancel-run.js';\nimport {createCheckoutTokenRoute} from './checkout-token.js';\nimport {getRunRoute} from './get-run.js';\nimport {getRunAggregatesRoute} from './get-run-aggregates.js';\nimport {getStepAttemptDetailRoute} from './get-step-attempt-detail.js';\nimport {createGetStepSecretsRoute} from './get-step-secrets.js';\nimport {listRunAttemptsRoute} from './list-run-attempts.js';\nimport {listRunsRoute} from './list-runs.js';\nimport {createNextStepRoute} from './next-step.js';\nimport {createReportStepRoute} from './report-step.js';\nimport {rerunRunRoute} from './rerun-run.js';\n\ntype WorkflowRouteClients = {\n agent: AgentInterModuleClient;\n annotations: AnnotationsInterModuleClient;\n auth: AuthInterModuleClient;\n integrations: IntegrationsModuleClient;\n projects: ProjectsModuleClient;\n runners: RunnersInterModuleClient;\n secrets: SecretsInterModuleClient;\n workspaces: WorkspacesInterModuleClient;\n};\n\ntype LeaseTokenRouteClients = Omit<WorkflowRouteClients, 'workspaces'>;\n\nexport function createLeaseTokenRouteGroup(params: LeaseTokenRouteClients): RouteGroup {\n return {\n // The lease token names the job, so the path carries no job id (\"current\").\n prefix: '/runs/jobs/current',\n auth: AUTH_LEASED_JOB,\n routes: [\n createNextStepRoute(params),\n createReportStepRoute(params.runners),\n createCheckoutTokenRoute({\n integrations: params.integrations,\n projects: params.projects,\n runners: params.runners,\n }),\n createAgentRuntimeConfigRoute(params),\n createGetStepSecretsRoute(params.runners, params.secrets),\n ],\n };\n}\n\nexport function createWorkflowRoutes(params: WorkflowRouteClients): RouteGroup[] {\n return [\n {\n prefix: '/workflows/runs',\n auth: AUTH_USER,\n routes: [\n listRunsRoute(params.projects),\n getRunAggregatesRoute(params.projects),\n listRunAttemptsRoute(params.projects),\n getRunRoute(params.projects),\n getStepAttemptDetailRoute(params.projects),\n cancelRunRoute(params.projects),\n rerunRunRoute(params.projects, params.workspaces),\n ],\n },\n createLeaseTokenRouteGroup(params),\n ];\n}\n"],"names":["AUTH_LEASED_JOB","AUTH_USER","createAgentRuntimeConfigRoute","cancelRunRoute","createCheckoutTokenRoute","getRunRoute","getRunAggregatesRoute","getStepAttemptDetailRoute","createGetStepSecretsRoute","listRunAttemptsRoute","listRunsRoute","createNextStepRoute","createReportStepRoute","rerunRunRoute","createLeaseTokenRouteGroup","params","prefix","auth","routes","runners","integrations","projects","secrets","createWorkflowRoutes","workspaces"],"mappings":"AAEA,SAAQA,eAAe,EAAEC,SAAS,QAAO,4BAA4B;AAQrE,SAAQC,6BAA6B,QAAO,4BAA4B;AACxE,SAAQC,cAAc,QAAO,kBAAkB;AAC/C,SAAQC,wBAAwB,QAAO,sBAAsB;AAC7D,SAAQC,WAAW,QAAO,eAAe;AACzC,SAAQC,qBAAqB,QAAO,0BAA0B;AAC9D,SAAQC,yBAAyB,QAAO,+BAA+B;AACvE,SAAQC,yBAAyB,QAAO,wBAAwB;AAChE,SAAQC,oBAAoB,QAAO,yBAAyB;AAC5D,SAAQC,aAAa,QAAO,iBAAiB;AAC7C,SAAQC,mBAAmB,QAAO,iBAAiB;AACnD,SAAQC,qBAAqB,QAAO,mBAAmB;AACvD,SAAQC,aAAa,QAAO,iBAAiB;AAe7C,OAAO,SAASC,2BAA2BC,MAA8B;IACvE,OAAO;QACL,4EAA4E;QAC5EC,QAAQ;QACRC,MAAMjB;QACNkB,QAAQ;YACNP,oBAAoBI;YACpBH,sBAAsBG,OAAOI,OAAO;YACpCf,yBAAyB;gBACvBgB,cAAcL,OAAOK,YAAY;gBACjCC,UAAUN,OAAOM,QAAQ;gBACzBF,SAASJ,OAAOI,OAAO;YACzB;YACAjB,8BAA8Ba;YAC9BP,0BAA0BO,OAAOI,OAAO,EAAEJ,OAAOO,OAAO;SACzD;IACH;AACF;AAEA,OAAO,SAASC,qBAAqBR,MAA4B;IAC/D,OAAO;QACL;YACEC,QAAQ;YACRC,MAAMhB;YACNiB,QAAQ;gBACNR,cAAcK,OAAOM,QAAQ;gBAC7Bf,sBAAsBS,OAAOM,QAAQ;gBACrCZ,qBAAqBM,OAAOM,QAAQ;gBACpChB,YAAYU,OAAOM,QAAQ;gBAC3Bd,0BAA0BQ,OAAOM,QAAQ;gBACzClB,eAAeY,OAAOM,QAAQ;gBAC9BR,cAAcE,OAAOM,QAAQ,EAAEN,OAAOS,UAAU;aACjD;QACH;QACAV,2BAA2BC;KAC5B;AACH"}
|
|
@@ -5,7 +5,7 @@ export declare function requireProjectAccess(request: FastifyRequest, projectId:
|
|
|
5
5
|
workspaceId: string;
|
|
6
6
|
sourceConnectionId: string;
|
|
7
7
|
sourceExternalRepositoryId: string;
|
|
8
|
-
name: string;
|
|
9
8
|
sourceRepositoryOwner?: string | null | undefined;
|
|
9
|
+
name: string;
|
|
10
10
|
}>;
|
|
11
11
|
//# sourceMappingURL=project-access.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { onJobTerminatedFailureAnnotation, onStepAttemptTerminatedFailureAnnotation, } from './on-failure-annotations.js';
|
|
1
2
|
export { onJobEventDelivered } from './on-job-event-delivered.js';
|
|
2
3
|
export { onJobStepsSettled } from './on-job-steps-settled.js';
|
|
3
4
|
export { onRunnerJobClaimed } from './on-runner-job-claimed.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,2BAA2B,EAAC,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAC,sBAAsB,EAAC,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,wCAAwC,GACzC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,2BAA2B,EAAC,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAC,sBAAsB,EAAC,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { onJobTerminatedFailureAnnotation, onStepAttemptTerminatedFailureAnnotation } from './on-failure-annotations.js';
|
|
1
2
|
export { onJobEventDelivered } from './on-job-event-delivered.js';
|
|
2
3
|
export { onJobStepsSettled } from './on-job-steps-settled.js';
|
|
3
4
|
export { onRunnerJobClaimed } from './on-runner-job-claimed.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/subscribers/index.ts"],"sourcesContent":["export {onJobEventDelivered} from './on-job-event-delivered.js';\nexport {onJobStepsSettled} from './on-job-steps-settled.js';\nexport {onRunnerJobClaimed} from './on-runner-job-claimed.js';\nexport {onRunnerJobLeaseExpired} from './on-runner-job-lease-expired.js';\nexport {onRunnerJobQueued} from './on-runner-job-queued.js';\nexport {onWorkflowRunAttemptCreated} from './on-workflow-run-attempt-created.js';\nexport {onWorkflowRunCancelled} from './on-workflow-run-cancelled.js';\n"],"names":["onJobEventDelivered","onJobStepsSettled","onRunnerJobClaimed","onRunnerJobLeaseExpired","onRunnerJobQueued","onWorkflowRunAttemptCreated","onWorkflowRunCancelled"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/subscribers/index.ts"],"sourcesContent":["export {\n onJobTerminatedFailureAnnotation,\n onStepAttemptTerminatedFailureAnnotation,\n} from './on-failure-annotations.js';\nexport {onJobEventDelivered} from './on-job-event-delivered.js';\nexport {onJobStepsSettled} from './on-job-steps-settled.js';\nexport {onRunnerJobClaimed} from './on-runner-job-claimed.js';\nexport {onRunnerJobLeaseExpired} from './on-runner-job-lease-expired.js';\nexport {onRunnerJobQueued} from './on-runner-job-queued.js';\nexport {onWorkflowRunAttemptCreated} from './on-workflow-run-attempt-created.js';\nexport {onWorkflowRunCancelled} from './on-workflow-run-cancelled.js';\n"],"names":["onJobTerminatedFailureAnnotation","onStepAttemptTerminatedFailureAnnotation","onJobEventDelivered","onJobStepsSettled","onRunnerJobClaimed","onRunnerJobLeaseExpired","onRunnerJobQueued","onWorkflowRunAttemptCreated","onWorkflowRunCancelled"],"mappings":"AAAA,SACEA,gCAAgC,EAChCC,wCAAwC,QACnC,8BAA8B;AACrC,SAAQC,mBAAmB,QAAO,8BAA8B;AAChE,SAAQC,iBAAiB,QAAO,4BAA4B;AAC5D,SAAQC,kBAAkB,QAAO,6BAA6B;AAC9D,SAAQC,uBAAuB,QAAO,mCAAmC;AACzE,SAAQC,iBAAiB,QAAO,4BAA4B;AAC5D,SAAQC,2BAA2B,QAAO,uCAAuC;AACjF,SAAQC,sBAAsB,QAAO,iCAAiC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type AnnotationsInterModuleClient } from '@shipfox/annotations-dto/inter-module';
|
|
2
|
+
import type { WorkflowsJobTerminatedEventDto, WorkflowsStepAttemptTerminatedEventDto } from '@shipfox/api-workflows-dto';
|
|
3
|
+
export declare function onStepAttemptTerminatedFailureAnnotation(annotations: AnnotationsInterModuleClient): (payload: WorkflowsStepAttemptTerminatedEventDto) => Promise<void>;
|
|
4
|
+
export declare function onJobTerminatedFailureAnnotation(annotations: AnnotationsInterModuleClient): (payload: WorkflowsJobTerminatedEventDto) => Promise<void>;
|
|
5
|
+
//# sourceMappingURL=on-failure-annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-failure-annotations.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/on-failure-annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,8BAA8B,EAC9B,sCAAsC,EACvC,MAAM,4BAA4B,CAAC;AAapC,wBAAgB,wCAAwC,CACtD,WAAW,EAAE,4BAA4B,aAElB,sCAAsC,KAAG,OAAO,CAAC,IAAI,CAAC,CA8D9E;AAED,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,4BAA4B,aACjE,8BAA8B,KAAG,OAAO,CAAC,IAAI,CAAC,CA2CtE"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { annotationsInterModuleContract } from '@shipfox/annotations-dto/inter-module';
|
|
2
|
+
import { isInterModuleKnownError } from '@shipfox/inter-module';
|
|
3
|
+
import { logger } from '@shipfox/node-opentelemetry';
|
|
4
|
+
import { getJobExecutionFailureOrigin, getJobScope, getStepAttemptDetail, getWorkflowRunAttemptById } from '#db/index.js';
|
|
5
|
+
import { recordWorkflowFailureAnnotationFailed } from '#metrics/instance.js';
|
|
6
|
+
const JOB_FAILURE_ANNOTATION_REASONS = new Set([
|
|
7
|
+
'timed_out',
|
|
8
|
+
'runner_lost',
|
|
9
|
+
'condition_errored'
|
|
10
|
+
]);
|
|
11
|
+
export function onStepAttemptTerminatedFailureAnnotation(annotations) {
|
|
12
|
+
return async (payload)=>{
|
|
13
|
+
// A first successful/cancelled attempt cannot have a stale failure annotation.
|
|
14
|
+
// Keep later terminal attempts on the lookup path so recovery removes the
|
|
15
|
+
// annotation created by an earlier failed attempt.
|
|
16
|
+
if (payload.status !== undefined && payload.status !== 'failed' && payload.attempt === 1) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const initialDetail = await getStepAttemptDetail({
|
|
21
|
+
stepId: payload.stepId,
|
|
22
|
+
attempt: payload.attempt
|
|
23
|
+
});
|
|
24
|
+
if (!initialDetail) return;
|
|
25
|
+
// The detail query joins the requested attempt to the step's current projection. A
|
|
26
|
+
// delayed event can therefore return an old attempt alongside a newer step status. Read
|
|
27
|
+
// the canonical current attempt before deciding whether to replace or remove the card.
|
|
28
|
+
const detail = initialDetail.attempt.attempt === initialDetail.step.currentAttempt ? initialDetail : await getStepAttemptDetail({
|
|
29
|
+
stepId: initialDetail.step.id,
|
|
30
|
+
attempt: initialDetail.step.currentAttempt
|
|
31
|
+
});
|
|
32
|
+
if (!detail || detail.attempt.attempt !== detail.step.currentAttempt) return;
|
|
33
|
+
const runAttempt = await getWorkflowRunAttemptById(payload.workflowRunAttemptId);
|
|
34
|
+
if (!runAttempt) return;
|
|
35
|
+
await writeFailureAnnotation({
|
|
36
|
+
annotations,
|
|
37
|
+
target: {
|
|
38
|
+
workspaceId: payload.workspaceId,
|
|
39
|
+
projectId: payload.projectId,
|
|
40
|
+
workflowRunId: payload.workflowRunId,
|
|
41
|
+
workflowRunAttempt: runAttempt.attempt,
|
|
42
|
+
workflowRunAttemptId: payload.workflowRunAttemptId,
|
|
43
|
+
jobId: payload.jobId,
|
|
44
|
+
jobExecutionId: detail.step.jobExecutionId,
|
|
45
|
+
originStepId: detail.step.id,
|
|
46
|
+
originStepAttempt: detail.attempt.attempt
|
|
47
|
+
},
|
|
48
|
+
context: failureContext('step', detail.step.id),
|
|
49
|
+
failed: detail.step.status === 'failed' || detail.attempt.status === 'failed' && detail.step.status !== 'succeeded' && detail.step.status !== 'cancelled',
|
|
50
|
+
body: stepFailureBody(detail.step.name, detail.attempt.error ?? detail.step.error, detail.attempt.exitCode)
|
|
51
|
+
});
|
|
52
|
+
} catch (error) {
|
|
53
|
+
recordFailureAnnotationFailure(error, 'lookup', {
|
|
54
|
+
stepId: payload.stepId,
|
|
55
|
+
jobId: payload.jobId
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function onJobTerminatedFailureAnnotation(annotations) {
|
|
61
|
+
return async (payload)=>{
|
|
62
|
+
// Step failures already have a step-scoped annotation. Job-scoped annotations
|
|
63
|
+
// are reserved for terminal causes where no step-level failure card exists.
|
|
64
|
+
const isConditionEvaluationFailure = payload.status === 'skipped' && payload.statusReason === 'condition_errored';
|
|
65
|
+
if (payload.status !== 'failed' && !isConditionEvaluationFailure || !JOB_FAILURE_ANNOTATION_REASONS.has(payload.statusReason ?? '')) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
const [scope, runAttempt] = await Promise.all([
|
|
70
|
+
getJobScope(payload.jobId),
|
|
71
|
+
getWorkflowRunAttemptById(payload.workflowRunAttemptId)
|
|
72
|
+
]);
|
|
73
|
+
if (!scope || !runAttempt || !payload.jobExecutionId) return;
|
|
74
|
+
const origin = await getJobExecutionFailureOrigin(payload.jobExecutionId);
|
|
75
|
+
if (!origin) return;
|
|
76
|
+
await writeFailureAnnotation({
|
|
77
|
+
annotations,
|
|
78
|
+
target: {
|
|
79
|
+
workspaceId: scope.workspaceId,
|
|
80
|
+
projectId: scope.projectId,
|
|
81
|
+
workflowRunId: payload.workflowRunId,
|
|
82
|
+
workflowRunAttempt: runAttempt.attempt,
|
|
83
|
+
workflowRunAttemptId: payload.workflowRunAttemptId,
|
|
84
|
+
jobId: payload.jobId,
|
|
85
|
+
jobExecutionId: origin.jobExecutionId,
|
|
86
|
+
originStepId: origin.stepId,
|
|
87
|
+
originStepAttempt: origin.stepAttempt
|
|
88
|
+
},
|
|
89
|
+
context: failureContext('job', payload.jobId),
|
|
90
|
+
failed: true,
|
|
91
|
+
body: jobFailureBody(payload.statusReason, origin)
|
|
92
|
+
});
|
|
93
|
+
} catch (error) {
|
|
94
|
+
recordFailureAnnotationFailure(error, 'lookup', {
|
|
95
|
+
jobId: payload.jobId
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Failure annotations are a best-effort projection. The workflow terminal fact is authoritative;
|
|
102
|
+
* projection lookup and writes are swallowed so they cannot change the workflow outcome. Every
|
|
103
|
+
* swallowed error emits a reason-labelled metric and a structured warning for operations.
|
|
104
|
+
*/ async function writeFailureAnnotation(params) {
|
|
105
|
+
try {
|
|
106
|
+
await params.annotations.replaceOrRemoveAnnotation({
|
|
107
|
+
...params.target,
|
|
108
|
+
context: params.context,
|
|
109
|
+
annotation: params.failed ? {
|
|
110
|
+
op: 'replace',
|
|
111
|
+
style: 'error',
|
|
112
|
+
body: params.body
|
|
113
|
+
} : {
|
|
114
|
+
op: 'remove'
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
} catch (error) {
|
|
118
|
+
const reason = isInterModuleKnownError(annotationsInterModuleContract.methods.replaceOrRemoveAnnotation, error) ? 'budget' : 'write';
|
|
119
|
+
recordFailureAnnotationFailure(error, reason, params.target);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function failureContext(kind, id) {
|
|
123
|
+
return `failure:${kind}:${id}`;
|
|
124
|
+
}
|
|
125
|
+
function stepFailureBody(name, error, exitCode) {
|
|
126
|
+
const reason = typeof error?.reason === 'string' ? error.reason : 'unknown';
|
|
127
|
+
const message = typeof error?.message === 'string' && error.message.trim() ? error.message : 'No failure message was recorded.';
|
|
128
|
+
return [
|
|
129
|
+
`**${name} failed**`,
|
|
130
|
+
'',
|
|
131
|
+
`Reason: \`${reason}\``,
|
|
132
|
+
`Exit code: \`${exitCode ?? 'none'}\``,
|
|
133
|
+
'',
|
|
134
|
+
message
|
|
135
|
+
].join('\n');
|
|
136
|
+
}
|
|
137
|
+
function jobFailureBody(reason, origin) {
|
|
138
|
+
const progress = origin.attemptStatus ? `The job stopped while processing **${origin.stepName}**.` : `The job stopped before **${origin.stepName}** started.`;
|
|
139
|
+
const error = origin.attemptError ?? origin.stepError;
|
|
140
|
+
const message = typeof error?.message === 'string' && error.message.trim() ? error.message : null;
|
|
141
|
+
const exitCode = origin.attemptExitCode === null ? null : `Exit code: \`${origin.attemptExitCode}\``;
|
|
142
|
+
return [
|
|
143
|
+
`**Job failed before completion**`,
|
|
144
|
+
'',
|
|
145
|
+
progress,
|
|
146
|
+
`Reason: \`${reason ?? 'unknown'}\``,
|
|
147
|
+
message ? `Failure: ${message}` : null,
|
|
148
|
+
exitCode
|
|
149
|
+
].filter(Boolean).join('\n');
|
|
150
|
+
}
|
|
151
|
+
function recordFailureAnnotationFailure(error, reason, context) {
|
|
152
|
+
recordWorkflowFailureAnnotationFailed(reason);
|
|
153
|
+
logger().warn({
|
|
154
|
+
error,
|
|
155
|
+
reason,
|
|
156
|
+
...context
|
|
157
|
+
}, 'Failed to project workflow failure annotation');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//# sourceMappingURL=on-failure-annotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/subscribers/on-failure-annotations.ts"],"sourcesContent":["import {\n type AnnotationsInterModuleClient,\n annotationsInterModuleContract,\n} from '@shipfox/annotations-dto/inter-module';\nimport type {\n WorkflowsJobTerminatedEventDto,\n WorkflowsStepAttemptTerminatedEventDto,\n} from '@shipfox/api-workflows-dto';\nimport {isInterModuleKnownError} from '@shipfox/inter-module';\nimport {logger} from '@shipfox/node-opentelemetry';\nimport {\n getJobExecutionFailureOrigin,\n getJobScope,\n getStepAttemptDetail,\n getWorkflowRunAttemptById,\n} from '#db/index.js';\nimport {recordWorkflowFailureAnnotationFailed} from '#metrics/instance.js';\n\nconst JOB_FAILURE_ANNOTATION_REASONS = new Set(['timed_out', 'runner_lost', 'condition_errored']);\n\nexport function onStepAttemptTerminatedFailureAnnotation(\n annotations: AnnotationsInterModuleClient,\n) {\n return async (payload: WorkflowsStepAttemptTerminatedEventDto): Promise<void> => {\n // A first successful/cancelled attempt cannot have a stale failure annotation.\n // Keep later terminal attempts on the lookup path so recovery removes the\n // annotation created by an earlier failed attempt.\n if (payload.status !== undefined && payload.status !== 'failed' && payload.attempt === 1) {\n return;\n }\n\n try {\n const initialDetail = await getStepAttemptDetail({\n stepId: payload.stepId,\n attempt: payload.attempt,\n });\n if (!initialDetail) return;\n\n // The detail query joins the requested attempt to the step's current projection. A\n // delayed event can therefore return an old attempt alongside a newer step status. Read\n // the canonical current attempt before deciding whether to replace or remove the card.\n const detail =\n initialDetail.attempt.attempt === initialDetail.step.currentAttempt\n ? initialDetail\n : await getStepAttemptDetail({\n stepId: initialDetail.step.id,\n attempt: initialDetail.step.currentAttempt,\n });\n if (!detail || detail.attempt.attempt !== detail.step.currentAttempt) return;\n\n const runAttempt = await getWorkflowRunAttemptById(payload.workflowRunAttemptId);\n if (!runAttempt) return;\n\n await writeFailureAnnotation({\n annotations,\n target: {\n workspaceId: payload.workspaceId,\n projectId: payload.projectId,\n workflowRunId: payload.workflowRunId,\n workflowRunAttempt: runAttempt.attempt,\n workflowRunAttemptId: payload.workflowRunAttemptId,\n jobId: payload.jobId,\n jobExecutionId: detail.step.jobExecutionId,\n originStepId: detail.step.id,\n originStepAttempt: detail.attempt.attempt,\n },\n context: failureContext('step', detail.step.id),\n failed:\n detail.step.status === 'failed' ||\n (detail.attempt.status === 'failed' &&\n detail.step.status !== 'succeeded' &&\n detail.step.status !== 'cancelled'),\n body: stepFailureBody(\n detail.step.name,\n detail.attempt.error ?? detail.step.error,\n detail.attempt.exitCode,\n ),\n });\n } catch (error) {\n recordFailureAnnotationFailure(error, 'lookup', {\n stepId: payload.stepId,\n jobId: payload.jobId,\n });\n }\n };\n}\n\nexport function onJobTerminatedFailureAnnotation(annotations: AnnotationsInterModuleClient) {\n return async (payload: WorkflowsJobTerminatedEventDto): Promise<void> => {\n // Step failures already have a step-scoped annotation. Job-scoped annotations\n // are reserved for terminal causes where no step-level failure card exists.\n const isConditionEvaluationFailure =\n payload.status === 'skipped' && payload.statusReason === 'condition_errored';\n if (\n (payload.status !== 'failed' && !isConditionEvaluationFailure) ||\n !JOB_FAILURE_ANNOTATION_REASONS.has(payload.statusReason ?? '')\n ) {\n return;\n }\n\n try {\n const [scope, runAttempt] = await Promise.all([\n getJobScope(payload.jobId),\n getWorkflowRunAttemptById(payload.workflowRunAttemptId),\n ]);\n if (!scope || !runAttempt || !payload.jobExecutionId) return;\n\n const origin = await getJobExecutionFailureOrigin(payload.jobExecutionId);\n if (!origin) return;\n\n await writeFailureAnnotation({\n annotations,\n target: {\n workspaceId: scope.workspaceId,\n projectId: scope.projectId,\n workflowRunId: payload.workflowRunId,\n workflowRunAttempt: runAttempt.attempt,\n workflowRunAttemptId: payload.workflowRunAttemptId,\n jobId: payload.jobId,\n jobExecutionId: origin.jobExecutionId,\n originStepId: origin.stepId,\n originStepAttempt: origin.stepAttempt,\n },\n context: failureContext('job', payload.jobId),\n failed: true,\n body: jobFailureBody(payload.statusReason, origin),\n });\n } catch (error) {\n recordFailureAnnotationFailure(error, 'lookup', {jobId: payload.jobId});\n }\n };\n}\n\ntype FailureAnnotationTarget = {\n workspaceId: string;\n projectId: string;\n workflowRunId: string;\n workflowRunAttempt: number;\n workflowRunAttemptId: string;\n jobId: string;\n jobExecutionId: string;\n originStepId: string;\n originStepAttempt: number;\n};\n\n/**\n * Failure annotations are a best-effort projection. The workflow terminal fact is authoritative;\n * projection lookup and writes are swallowed so they cannot change the workflow outcome. Every\n * swallowed error emits a reason-labelled metric and a structured warning for operations.\n */\nasync function writeFailureAnnotation(params: {\n annotations: AnnotationsInterModuleClient;\n target: FailureAnnotationTarget;\n context: string;\n failed: boolean;\n body: string;\n}): Promise<void> {\n try {\n await params.annotations.replaceOrRemoveAnnotation({\n ...params.target,\n context: params.context,\n annotation: params.failed\n ? {op: 'replace', style: 'error', body: params.body}\n : {op: 'remove'},\n });\n } catch (error) {\n const reason = isInterModuleKnownError(\n annotationsInterModuleContract.methods.replaceOrRemoveAnnotation,\n error,\n )\n ? 'budget'\n : 'write';\n recordFailureAnnotationFailure(error, reason, params.target);\n }\n}\n\nfunction failureContext(kind: 'job' | 'step', id: string): string {\n return `failure:${kind}:${id}`;\n}\n\nfunction stepFailureBody(\n name: string,\n error: Record<string, unknown> | null,\n exitCode: number | null,\n): string {\n const reason = typeof error?.reason === 'string' ? error.reason : 'unknown';\n const message =\n typeof error?.message === 'string' && error.message.trim()\n ? error.message\n : 'No failure message was recorded.';\n return [\n `**${name} failed**`,\n '',\n `Reason: \\`${reason}\\``,\n `Exit code: \\`${exitCode ?? 'none'}\\``,\n '',\n message,\n ].join('\\n');\n}\n\nfunction jobFailureBody(\n reason: string | null,\n origin: {\n stepName: string;\n attemptStatus: string | null;\n stepError: Record<string, unknown> | null;\n attemptError: Record<string, unknown> | null;\n attemptExitCode: number | null;\n },\n): string {\n const progress = origin.attemptStatus\n ? `The job stopped while processing **${origin.stepName}**.`\n : `The job stopped before **${origin.stepName}** started.`;\n const error = origin.attemptError ?? origin.stepError;\n const message = typeof error?.message === 'string' && error.message.trim() ? error.message : null;\n const exitCode =\n origin.attemptExitCode === null ? null : `Exit code: \\`${origin.attemptExitCode}\\``;\n return [\n `**Job failed before completion**`,\n '',\n progress,\n `Reason: \\`${reason ?? 'unknown'}\\``,\n message ? `Failure: ${message}` : null,\n exitCode,\n ]\n .filter(Boolean)\n .join('\\n');\n}\n\nfunction recordFailureAnnotationFailure(\n error: unknown,\n reason: 'lookup' | 'budget' | 'write',\n context: Record<string, string | number>,\n): void {\n recordWorkflowFailureAnnotationFailed(reason);\n logger().warn({error, reason, ...context}, 'Failed to project workflow failure annotation');\n}\n"],"names":["annotationsInterModuleContract","isInterModuleKnownError","logger","getJobExecutionFailureOrigin","getJobScope","getStepAttemptDetail","getWorkflowRunAttemptById","recordWorkflowFailureAnnotationFailed","JOB_FAILURE_ANNOTATION_REASONS","Set","onStepAttemptTerminatedFailureAnnotation","annotations","payload","status","undefined","attempt","initialDetail","stepId","detail","step","currentAttempt","id","runAttempt","workflowRunAttemptId","writeFailureAnnotation","target","workspaceId","projectId","workflowRunId","workflowRunAttempt","jobId","jobExecutionId","originStepId","originStepAttempt","context","failureContext","failed","body","stepFailureBody","name","error","exitCode","recordFailureAnnotationFailure","onJobTerminatedFailureAnnotation","isConditionEvaluationFailure","statusReason","has","scope","Promise","all","origin","stepAttempt","jobFailureBody","params","replaceOrRemoveAnnotation","annotation","op","style","reason","methods","kind","message","trim","join","progress","attemptStatus","stepName","attemptError","stepError","attemptExitCode","filter","Boolean","warn"],"mappings":"AAAA,SAEEA,8BAA8B,QACzB,wCAAwC;AAK/C,SAAQC,uBAAuB,QAAO,wBAAwB;AAC9D,SAAQC,MAAM,QAAO,8BAA8B;AACnD,SACEC,4BAA4B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AI,KACpDtB,MAAMqB,OAAO,GACb;IACN,OAAO;QACL,CAAC,EAAE,EAAEtB,KAAK,SAAS,CAAC;QACpB;QACA,CAAC,UAAU,EAAEmB,OAAO,EAAE,CAAC;QACvB,CAAC,aAAa,EAAEjB,YAAY,OAAO,EAAE,CAAC;QACtC;QACAoB;KACD,CAACE,IAAI,CAAC;AACT;AAEA,SAASX,eACPM,MAAqB,EACrBR,MAMC;IAED,MAAMc,WAAWd,OAAOe,aAAa,GACjC,CAAC,mCAAmC,EAAEf,OAAOgB,QAAQ,CAAC,GAAG,CAAC,GAC1D,CAAC,yBAAyB,EAAEhB,OAAOgB,QAAQ,CAAC,WAAW,CAAC;IAC5D,MAAM1B,QAAQU,OAAOiB,YAAY,IAAIjB,OAAOkB,SAAS;IACrD,MAAMP,UAAU,OAAOrB,OAAOqB,YAAY,YAAYrB,MAAMqB,OAAO,CAACC,IAAI,KAAKtB,MAAMqB,OAAO,GAAG;IAC7F,MAAMpB,WACJS,OAAOmB,eAAe,KAAK,OAAO,OAAO,CAAC,aAAa,EAAEnB,OAAOmB,eAAe,CAAC,EAAE,CAAC;IACrF,OAAO;QACL,CAAC,gCAAgC,CAAC;QAClC;QACAL;QACA,CAAC,UAAU,EAAEN,UAAU,UAAU,EAAE,CAAC;QACpCG,UAAU,CAAC,SAAS,EAAEA,SAAS,GAAG;QAClCpB;KACD,CACE6B,MAAM,CAACC,SACPR,IAAI,CAAC;AACV;AAEA,SAASrB,+BACPF,KAAc,EACdkB,MAAqC,EACrCxB,OAAwC;IAExC3B,sCAAsCmD;IACtCxD,SAASsE,IAAI,CAAC;QAAChC;QAAOkB;QAAQ,GAAGxB,OAAO;IAAA,GAAG;AAC7C"}
|
|
@@ -16,7 +16,7 @@ export declare function createOrchestrationActivities(params: {
|
|
|
16
16
|
setJobStatus: typeof setJobStatus;
|
|
17
17
|
setJobExecutionStatus: (activityParams: Parameters<typeof setJobExecutionStatus>[0]) => Promise<{
|
|
18
18
|
newVersion: number;
|
|
19
|
-
status: Exclude<import("../../core/index.js").JobStatus,
|
|
19
|
+
status: Exclude<import("../../core/index.js").JobStatus, 'skipped'>;
|
|
20
20
|
}>;
|
|
21
21
|
bulkSetStepStatuses: typeof bulkSetStepStatuses;
|
|
22
22
|
cancelRunnerJobsActivity: (params: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AACjF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EAKnB,8BAA8B,EAC9B,kCAAkC,EAClC,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,mCAAmC,EACnC,0BAA0B,EAC1B,yCAAyC,EACzC,uCAAuC,EACvC,qBAAqB,EACrB,YAAY,EACZ,mBAAmB,EACnB,kCAAkC,EACnC,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,6BAA6B,CAAC,MAAM,EAAE;IACpD,KAAK,EAAE,sBAAsB,CAAC;IAC9B,YAAY,EAAE,wBAAwB,CAAC;IACvC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,CAAC;CACpE;;;;4CAKiD,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yDAOvE,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AACjF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AACpF,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EAKnB,8BAA8B,EAC9B,kCAAkC,EAClC,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,mCAAmC,EACnC,0BAA0B,EAC1B,yCAAyC,EACzC,uCAAuC,EACvC,qBAAqB,EACrB,YAAY,EACZ,mBAAmB,EACnB,kCAAkC,EACnC,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,6BAA6B,CAAC,MAAM,EAAE;IACpD,KAAK,EAAE,sBAAsB,CAAC;IAC9B,YAAY,EAAE,wBAAwB,CAAC;IACvC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,CAAC;CACpE;;;;4CAKiD,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yDAOvE,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;8DAexD,UAAU,CAAC,OAAO,uCAAuC,CAAC,CAAC,CAAC,CAAC;;;;;;;;EAKlF"}
|
|
@@ -127,7 +127,7 @@ export declare function resolveJobListenerActivity(params: {
|
|
|
127
127
|
jobId: string;
|
|
128
128
|
reason: ResolutionReason;
|
|
129
129
|
}): Promise<{
|
|
130
|
-
status:
|
|
130
|
+
status: 'succeeded' | 'failed';
|
|
131
131
|
jobVersion: number;
|
|
132
132
|
}>;
|
|
133
133
|
export declare function settleListenerJobExecutionActivity(params: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-activities.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/orchestration-activities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AACjF,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,uCAAuC,CAAC;AAIpF,OAAO,KAAK,EAAC,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,KAAK,EAAC,6BAA6B,EAAE,UAAU,EAAC,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AAEtE,OAAO,KAAK,EACV,uBAAuB,EACvB,cAAc,EACf,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAIL,KAAK,4BAA4B,EAQjC,KAAK,qBAAqB,EAS3B,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,MAAO,SAAQ,cAAc;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC;IAC/B,MAAM,EAAE,SAAS,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;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ACpE,YAC2D;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,+DAGF;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,sDAEvE;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;CAC1B;;;GAEA;AAED,wBAAsB,kCAAkC,CAAC,MAAM,EAAE;IAC/D,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAC;CAChC,iBAEA;AAQD,wBAAgB,mCAAmC,CAAC,MAAM,EAAE;IAC1D,OAAO,EAAE,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;CAC/C,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhB"}
|
|
@@ -88,7 +88,7 @@ export declare function setExecutionStatusCalls(): Array<{
|
|
|
88
88
|
export declare function listenerFiringOutcomeCalls(): Array<{
|
|
89
89
|
name: string;
|
|
90
90
|
params: {
|
|
91
|
-
outcome:
|
|
91
|
+
outcome: 'succeeded' | 'failed' | 'cancelled';
|
|
92
92
|
};
|
|
93
93
|
}>;
|
|
94
94
|
export declare function resolveJobListenerCalls(): Array<{
|
|
@@ -102,7 +102,7 @@ export declare function settleListenerCalls(): Array<{
|
|
|
102
102
|
name: string;
|
|
103
103
|
params: {
|
|
104
104
|
jobExecutionId: string;
|
|
105
|
-
status:
|
|
105
|
+
status: 'failed' | 'cancelled';
|
|
106
106
|
};
|
|
107
107
|
}>;
|
|
108
108
|
export declare function dagJob(id: string, key: string, deps?: string[], options?: {
|