Skip to content

fix: publish-hostless workflow picks wrong container image from ECS#207

Merged
field123 merged 1 commit intomasterfrom
fix/publish-hostless-container-query
Apr 8, 2026
Merged

fix: publish-hostless workflow picks wrong container image from ECS#207
field123 merged 1 commit intomasterfrom
fix/publish-hostless-container-query

Conversation

@field123
Copy link
Copy Markdown
Collaborator

@field123 field123 commented Apr 8, 2026

Problem

The "Publish Hostless Packages" GitHub Actions workflow fails with exit code 127: node: command not found.

This has been broken since March 2026. Last successful run was February 19, 2026.

Root Cause

The workflow queries the deployed ECS task definition to find the WAB container image:

--query 'taskDefinition.containerDefinitions[0].image'

But containerDefinitions[0] is the Fluent Bit log-router sidecar (amazon/aws-for-fluent-bit:stable), not the WAB container. The task definition has 3 containers:

Index Name Image
0 log-router amazon/aws-for-fluent-bit:stable
1 wab 941131938315.dkr.ecr.../plasmic/wab:...
2 datadog-agent public.ecr.aws/datadog/agent:latest

The Dockerfile.publish-hostless then builds on top of the Fluent Bit image (which has no node binary) instead of the WAB image, causing node: command not found.

Verified locally

# WAB image — node exists
$ docker run --rm --entrypoint /bin/sh <wab-image> -c "which node"
/usr/local/bin/node

# publish-hostless image (built on Fluent Bit) — no node
$ docker run --rm --entrypoint /bin/sh <publish-hostless-image> -c "which node"
(nothing found)

Fix

Query by container name instead of array index:

--query "taskDefinition.containerDefinitions[?name=='wab'].image | [0]"

Why it worked in February

Before Datadog sidecar containers were added to the WAB task definition, containerDefinitions[0] was the WAB container. When sidecars (Fluent Bit, Datadog) were added, WAB shifted to index 1 but this query was not updated.

The workflow used containerDefinitions[0] to get the deployed WAB
image, but index 0 is the Fluent Bit log-router sidecar, not the
WAB container. This caused the publish-hostless Docker image to be
built on top of the Fluent Bit image (which has no node binary),
resulting in exit code 127: "node: command not found".

Fix: query by container name 'wab' instead of array index.

Verified by pulling both images locally:
- WAB image: /usr/local/bin/node exists (125MB, v24.14.1)
- publish-hostless image: node binary completely missing
  (built on Fluent Bit base instead of WAB base)
@field123 field123 merged commit 9c5ce45 into master Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant