Skip to content

Generate a fresh EmrContainerOperator request token on each task attempt#69625

Merged
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:ramitkataria/emr-container-fresh-request-token
Jul 10, 2026
Merged

Generate a fresh EmrContainerOperator request token on each task attempt#69625
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:ramitkataria/emr-container-fresh-request-token

Conversation

@ramitkataria

Copy link
Copy Markdown
Contributor

EmrContainerOperator fixed its client idempotency token once at construction. When the same operator instance was reused across task retries, every attempt resent that token, so EMR on EKS returned the original job run instead of starting a new one. A retry after a transient submit or startup failure therefore replayed the failed run and could never recover.

The default token is now resolved on each execute() call, so a task retry starts a genuinely new job run. An explicitly supplied token is still used verbatim, preserving intentional idempotency for callers who want repeated submissions to collapse to one run.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

EmrContainerOperator fixed its client idempotency token once at
construction. When the same operator instance was reused across task
retries, every attempt resent that token, so EMR on EKS returned the
original job run instead of starting a new one. A retry after a
transient submit or startup failure therefore replayed the failed run
and could never recover.

The default token is now resolved on each execute() call, so a task
retry starts a genuinely new job run. An explicitly supplied token is
still used verbatim, preserving intentional idempotency for callers who
want repeated submissions to collapse to one run.
@ramitkataria
ramitkataria requested a review from o-nikolas as a code owner July 8, 2026 16:37
@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Jul 8, 2026
@vincbeck
vincbeck merged commit 211d93d into apache:main Jul 10, 2026
83 checks passed
@vincbeck
vincbeck deleted the ramitkataria/emr-container-fresh-request-token branch July 10, 2026 13:04
joshuabvarghese pushed a commit to joshuabvarghese/airflow that referenced this pull request Jul 16, 2026
…mpt (apache#69625)

EmrContainerOperator fixed its client idempotency token once at
construction. When the same operator instance was reused across task
retries, every attempt resent that token, so EMR on EKS returned the
original job run instead of starting a new one. A retry after a
transient submit or startup failure therefore replayed the failed run
and could never recover.

The default token is now resolved on each execute() call, so a task
retry starts a genuinely new job run. An explicitly supplied token is
still used verbatim, preserving intentional idempotency for callers who
want repeated submissions to collapse to one run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants