spad.task-definition-update ​
Updates ECS task definition when build configuration changes
Updates ECS task definition when build configuration changes.
Input fields: site_id, organization_id, node_version (optional), output_directory (optional), old_node_version (optional), old_output_directory (optional), build_config_id (optional)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | SpadSite.id whose task definition should be updated |
organization_uuid | string | No | — | Organization that owns the site |
node_version | string | No | — | New Node.js version to set on the build container |
output_directory | string | No | — | New build output directory |
old_node_version | string | No | — | Previous Node.js version (for delta logging) |
old_output_directory | string | No | — | Previous output directory (for delta logging) |
build_config_uuid | string | No | — | SpadBuildConfig.id that triggered the update |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | Site whose task definition was updated |
organization_uuid | string | Yes | — | Organization that owns the site |
slug | string | Yes | — | Site slug |
cloud_connection_uuid | string | Yes | — | AWS CloudConnection.id the task definition lives in |
current_task_definition_arn | string | Yes | — | Task definition ARN prior to the update |
new_node_version | string | No | — | Requested Node.js version (input propagated) |
new_output_directory | string | No | — | Requested output directory (input propagated) |
old_node_version | string | No | — | Previous Node.js version recorded for delta |
old_output_directory | string | No | — | Previous output directory recorded for delta |
build_config_uuid | string | No | — | SpadBuildConfig.id that triggered the update |
current_task_definition | dict | Yes | — | Snapshot of the prior task definition (arn/family/revision/cpu/memory/image/node_version/output_directory) |
new_task_definition_arn | string | Yes | — | Task definition ARN after the update (same as current when no change) |
new_revision | integer | Yes | — | Revision number after the update |
final_node_version | string | No | — | Effective Node.js version after the update |
final_output_directory | string | Yes | — | Effective output directory after the update |
node_version_changed | boolean | Yes | — | True when a new revision was registered because node_version changed |
initiated_at | string | Yes | — | ISO8601 timestamp when the workflow was initiated |
updated_at | string | Yes | — | ISO8601 timestamp when the revision step completed |
completed_at | string | No | — | ISO8601 timestamp when the workflow reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the workflow reached FAILED |
failure_reason | string | No | — | Reason recorded on the failure path |
node_version | string | No | — | New Node.js version to set on the build container |
output_directory | string | No | — | New build output directory |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | get_current_definition | — |
creating_revision | No | No | — | complete | — |
getting_current | No | No | — | create_new_revision | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | get_current_definition | getting_current | — |
getting_current | create_new_revision | creating_revision | — |
creating_revision | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.task-definition-update",
"initial_data": {
"site_uuid": "value"
}
}