Skip to content

Conversation

@hehe7318
Copy link
Contributor

Description of changes

Prevent the bad IndexError when build image fails

When build image fails, the image_list is empty but the code directly accesses image_list[0], causing IndexError that masks the real error. Add safety check to only access list elements when list is not empty.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

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

When build image fails, the image_list is empty but the code directly
accesses image_list[0], causing IndexError that masks the real error.
Add safety check to only access list elements when list is not empty.
@hehe7318 hehe7318 requested a review from a team as a code owner December 22, 2025 21:00
@hehe7318 hehe7318 added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x labels Dec 22, 2025
@hehe7318 hehe7318 requested a review from a team as a code owner December 22, 2025 21:00
@hehe7318 hehe7318 enabled auto-merge (squash) December 23, 2025 14:44
@hehe7318 hehe7318 merged commit 0960980 into aws:release-3.14 Dec 23, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants