Skip to content

Commit 5629b6d

Browse files
authored
[IntegTests] Fix fetching order of build-image events when logging (aws#4758)
- Currently build image events are fetched from the earliest event. This does not return the most recent logs. - This commit sets the start-from-head argument to False, ensuring that the events are fetched from the tail/most recent. Signed-off-by: Eddy Mwiti <[email protected]> Co-authored-by: Eddy Mwiti <[email protected]>
1 parent b3e98f8 commit 5629b6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration-tests/tests/createami/test_createami.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,5 +553,5 @@ def _test_build_image_failed(image):
553553
def _keep_recent_logs(image):
554554
"""Keep several lines of recent log to the console when creating an image fails."""
555555
log_stream_name = f"{get_installed_parallelcluster_base_version()}/1"
556-
failure_logs = image.get_log_events(log_stream_name, start_from_head=True, query="events[*].message", limit=100)
556+
failure_logs = image.get_log_events(log_stream_name, start_from_head=False, query="events[*]", limit=100)
557557
logging.info(f"Image built failed for {image.image_id}, the last 100 lines of the log are: {failure_logs}")

0 commit comments

Comments
 (0)