Skip to content

Fix flaky e2e remote-logging tests (LocalStack bucket creation)#67976

Merged
bugraoz93 merged 1 commit into
apache:mainfrom
potiuk:fix-e2e-localstack-bucket-init
Jun 3, 2026
Merged

Fix flaky e2e remote-logging tests (LocalStack bucket creation)#67976
bugraoz93 merged 1 commit into
apache:mainfrom
potiuk:fix-e2e-localstack-bucket-init

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Jun 3, 2026

The remote-logging and XCom object-storage e2e tests (Additional PROD image
tests) intermittently fail with NoSuchBucket because the LocalStack init
hook never creates the buckets.

airflow-e2e-tests/scripts/init-aws.sh runs as a LocalStack READY init hook
inside the localstack container, but it connected to the docker-compose
service name http://localstack:4566. That endpoint is not reliably
connectable from within the container at the READY stage, so both aws s3 mb
calls failed (Could not connect to the endpoint URL, script exit 255), the
test-airflow-logs / test-xcom-objectstorage-backend buckets were never
created, and worker PutObject calls returned NoSuchBucket.

Fix: connect over loopback (http://localhost:4566) from inside the container,
add a short readiness wait, and set -euo pipefail so a transient gateway
delay cannot silently leave the buckets uncreated.

Observed on the v3-2-test branch:
https://github.com/apache/airflow/actions/runs/26889226071/job/79325331114


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

…pback

The remote-logging and XCom object-storage e2e tests intermittently failed
with NoSuchBucket because the LocalStack init hook never created the buckets.

init-aws.sh runs inside the localstack container, but connected to the docker
compose service name (http://localstack:4566), which is not reliably
connectable from within the container at the READY-hook stage. When it failed,
'aws s3 mb' exited non-zero and the buckets were never created, so worker
PutObject calls returned NoSuchBucket.

Connect over loopback (http://localhost:4566) instead, and add a short
readiness wait with 'set -euo pipefail' so a transient gateway delay cannot
silently leave the buckets uncreated.
@potiuk potiuk added this to the Airflow 3.2.3 milestone Jun 3, 2026
@potiuk potiuk requested a review from bugraoz93 as a code owner June 3, 2026 21:17
@potiuk potiuk added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Jun 3, 2026
@potiuk potiuk requested a review from jason810496 as a code owner June 3, 2026 21:17
Copy link
Copy Markdown
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@bugraoz93 bugraoz93 merged commit 23adbde into apache:main Jun 3, 2026
85 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 3, 2026
…kets via loopback (apache#67976)

The remote-logging and XCom object-storage e2e tests intermittently failed
with NoSuchBucket because the LocalStack init hook never created the buckets.

init-aws.sh runs inside the localstack container, but connected to the docker
compose service name (http://localstack:4566), which is not reliably
connectable from within the container at the READY-hook stage. When it failed,
'aws s3 mb' exited non-zero and the buckets were never created, so worker
PutObject calls returned NoSuchBucket.

Connect over loopback (http://localhost:4566) instead, and add a short
readiness wait with 'set -euo pipefail' so a transient gateway delay cannot
silently leave the buckets uncreated.
(cherry picked from commit 23adbde)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
bugraoz93 pushed a commit that referenced this pull request Jun 3, 2026
…kets via loopback (#67976) (#67981)

The remote-logging and XCom object-storage e2e tests intermittently failed
with NoSuchBucket because the LocalStack init hook never created the buckets.

init-aws.sh runs inside the localstack container, but connected to the docker
compose service name (http://localstack:4566), which is not reliably
connectable from within the container at the READY-hook stage. When it failed,
'aws s3 mb' exited non-zero and the buckets were never created, so worker
PutObject calls returned NoSuchBucket.

Connect over loopback (http://localhost:4566) instead, and add a short
readiness wait with 'set -euo pipefail' so a transient gateway delay cannot
silently leave the buckets uncreated.
(cherry picked from commit 23adbde)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants