Skip to content

Conversation

@hehe7318
Copy link
Contributor

@hehe7318 hehe7318 commented Jan 6, 2026

Description of changes

Add retry mechanism to handle transient CI environment issues in build-image and get-image-stack-events commands. These errors include:

  • Package metadata issues (error message contains only 'aws-parallelcluster')
  • Infrastructure creation failures with package loading problems
  • ModuleNotFoundError for pcluster modules
  • pyenv command not found errors

Retries up to 3 times with 30 second delays between attempts.

Tests

  • Running

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.

Add retry mechanism to handle transient CI environment issues in
build-image and get-image-stack-events commands. These errors include:
- Package metadata issues (error message contains only 'aws-parallelcluster')
- Infrastructure creation failures with package loading problems
- ModuleNotFoundError for pcluster modules
- pyenv command not found errors

Retries up to 3 times with 30 second delays between attempts.
@hehe7318 hehe7318 requested review from a team as code owners January 6, 2026 22:39
@hehe7318 hehe7318 added the 3.x label Jan 6, 2026
@hehe7318 hehe7318 added the skip-changelog-update Disables the check that enforces changelog updates in PRs label Jan 6, 2026
TRANSIENT_RETRY_DELAY_SECONDS = 30


def _is_transient_pcluster_error(stdout: str = None, stderr: str = None) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's first understand the root cause of this transient failure before covering it with a retry. A retry could mask an issue that could have impacts on other parts of our CICD infra.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The retry is only for build-image, and only for specific error pattern. It will not mask issues on other parts. And we only noticed these kind of issues on build-image. I think we can make it stable first and in parallel dive deep to the root cause. We already have enough test samples for our research. What do you think?

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