Skip to content

[Test] Fix race condition in test_build_image caused by export-image-logs and facilitate troubleshooting#7487

Merged
gmarciani merged 1 commit into
aws:integ-tests-3.15.1from
gmarciani:wip/mgiacomo/3151/fix-tests-0714-1
Jul 15, 2026
Merged

[Test] Fix race condition in test_build_image caused by export-image-logs and facilitate troubleshooting#7487
gmarciani merged 1 commit into
aws:integ-tests-3.15.1from
gmarciani:wip/mgiacomo/3151/fix-tests-0714-1

Conversation

@gmarciani

@gmarciani gmarciani commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description of changes

Fix race condition in test_build_image caused by export-image-logs

PR #7486 traded one race for another.
It fixed export-image-logs running too late, when the log group has already been deleted as part of a successful
build-image teardown, by moving the export earlier. But it then ran too early: it only waited for the build log stream to exist, however the log stream must contain some events for the export task to produce something.

The fix waits for the build log stream to be non-empty, not just to exist, before exporting, so the log data is ready to be exported.

Also set explicit messages on the soft assertions used by the test to ease troubleshooting.

Tests

SUCCESS

test-suites:
  createami:
    test_createami.py::test_build_image:
      dimensions:
      - instances:
        - g4dn.2xlarge
        oss:
        - ubuntu2404
        regions:
        - eu-west-2
        schedulers:
        - slurm
      - instances:
        - g4dn.2xlarge
        oss:
        - alinux2
        regions:
        - eu-west-2
        schedulers:
        - slurm
      - instances:
        - g4dn.2xlarge
        oss:
        - rhel9
        regions:
        - ap-northeast-2
        schedulers:
        - slurm
      - instances:
        - g4dn.2xlarge
        oss:
        - ubuntu2204
        regions:
        - eu-west-2
        schedulers:
        - slurm
      - instances:
        - g4dn.2xlarge
        oss:
        - rhel8
        regions:
        - ap-northeast-2
        schedulers:
        - slurm

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gmarciani gmarciani added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x Test labels Jul 14, 2026
@gmarciani gmarciani force-pushed the wip/mgiacomo/3151/fix-tests-0714-1 branch from 07778ef to 39c5f3c Compare July 15, 2026 04:13
@gmarciani gmarciani marked this pull request as ready for review July 15, 2026 04:13
@gmarciani gmarciani requested review from a team as code owners July 15, 2026 04:13
@gmarciani gmarciani changed the title [Test] Fix race condition in test_build_image caused by export logs. [Test] Fix race condition in test_build_image caused by export-image-logs Jul 15, 2026
@gmarciani gmarciani changed the title [Test] Fix race condition in test_build_image caused by export-image-logs [Test] Fix race condition in test_build_image caused by export-image-logs and facilitate troubleshooting Jul 15, 2026
@gmarciani gmarciani force-pushed the wip/mgiacomo/3151/fix-tests-0714-1 branch from 39c5f3c to 0bc03d9 Compare July 15, 2026 04:45
@gmarciani gmarciani merged commit 4802974 into aws:integ-tests-3.15.1 Jul 15, 2026
19 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x skip-changelog-update Disables the check that enforces changelog updates in PRs Test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants