Skip to content

[Test] Fix export-image-logs race by exporting while stack still exists#7484

Merged
gmarciani merged 1 commit into
aws:integ-tests-3.15.1from
gmarciani:wip/mgiacomo/3151/test-build-image-0710-1
Jul 13, 2026
Merged

[Test] Fix export-image-logs race by exporting while stack still exists#7484
gmarciani merged 1 commit into
aws:integ-tests-3.15.1from
gmarciani:wip/mgiacomo/3151/test-build-image-0710-1

Conversation

@gmarciani

@gmarciani gmarciani commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description of changes

Fix export-image-logs race by exporting while stack still exists

In test_build_image, export logs as soon as the build log stream is available (while BUILD_IN_PROGRESS) so the build-image stack is guaranteed to exist, instead of after BUILD_COMPLETE when it self-deletes.

Also validate export from a failed build, whose stack and log stream are retained.
Notice that we already export image logs if the image fails in test_build_image to capture logs for troubleshooting. However we do not assert on that command to succeed. That's the reason why we added the assertion on test test_build_image_wrong_pcluster_version

Tests

SUCCESS (Same test [params that reported the failure)

test-suites:
  createami:
    test_createami.py::test_build_image:
      dimensions:
      - instances:
        - g4dn.2xlarge
        oss:
        - rhel8
        regions:
        - us-west-2
        schedulers:
        - slurm
    test_createami.py::test_build_image_wrong_pcluster_version:
      dimensions:
      - instances:
        - g4dn.2xlarge
        oss:
        - rhel8
        regions:
        - us-west-2

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 13, 2026
@gmarciani gmarciani marked this pull request as ready for review July 13, 2026 16:03
@gmarciani gmarciani requested review from a team as code owners July 13, 2026 16:03
In test_build_image, export logs as soon as the build log stream is
available (while BUILD_IN_PROGRESS) so the build-image stack is
guaranteed to exist, instead of after BUILD_COMPLETE when it
self-deletes. Also validate export from a failed build, whose stack and
log stream are retained.
@gmarciani gmarciani force-pushed the wip/mgiacomo/3151/test-build-image-0710-1 branch from 48f1618 to b45185d Compare July 13, 2026 16:25
@gmarciani gmarciani merged commit fd56b5c into aws:integ-tests-3.15.1 Jul 13, 2026
19 of 24 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

✅ Cherry-pick to develop opened: #7486

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