Skip to content

Conversation

@wutimot
Copy link
Collaborator

@wutimot wutimot commented Sep 17, 2025

Issue #, if available:

Description of changes: Backend EMR step is using retryable step, but the sagemaker python sdk didn't have retryable step, so customers couldn't configure retry policies in their EMR step. This change fixes that so customer are able to optionally pass in retry policies.

Testing done: Ran unit and integration tests for the changes:

tox -e py310 -- -s -vv tests/unit/sagemaker/workflow/test_emr_step.py
tox -e py310 -- -s -vv tests/integ/sagemaker/workflow/test_emr_steps.py

Old unit and integ tests also pass, so backward compatibility is in place.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the CONTRIBUTING doc
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • I used the commit message format described in CONTRIBUTING
  • I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • I have checked that my tests are not configured for a specific region or account (if appropriate)
  • I have used unique_name_from_base to create resource names in integ tests (if appropriate)
  • If adding any dependency in requirements.txt files, I have spell checked and ensured they exist in PyPi

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

@wutimot wutimot marked this pull request as ready for review September 17, 2025 10:13
@wutimot wutimot requested a review from a team as a code owner September 17, 2025 10:13
@wutimot wutimot requested a review from chad119 September 17, 2025 10:13

try:
response = pipeline.create(role)
create_arn = response["PipelineArn"]
Copy link
Member

Choose a reason for hiding this comment

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

Can you also assert here that the pipeline definition contains the expected retry policies?

Copy link
Member

Choose a reason for hiding this comment

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

Nvm you have tested that in the unit tests already

@jam-jee jam-jee merged commit 7b865f5 into aws:master Sep 17, 2025
13 of 14 checks passed
Copy link
Contributor

@AWS-pratab AWS-pratab left a comment

Choose a reason for hiding this comment

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

Thoughts on: For the unknown service faults can we add default retry policies? Customer can override them to remove or update the retry policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants