Skip to content

Fix Comprehend document classifier timing out after 20 minutes - #71969

Merged
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:ramitkataria/fix-comprehend-classifier-waiter-defaults
Aug 26, 2026
Merged

vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:ramitkataria/fix-comprehend-classifier-waiter-defaults

Conversation

@ramitkataria

@ramitkataria ramitkataria commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Classifier training routinely takes 8 to 20+ minutes, but the operator's default waiter budget was 20 x 60s in both sync and deferrable paths, a cap the training time sometimes exceeded. Triple it to 40 x 60s. (The companion sensor and trigger allow 75 x 120s, but jumping the operator's implicit wait to 150 minutes would block Dag runs unexpectedly long, so they are intentionally left as is.) This also lets the system test Dag drop its wait_for_completion=False workaround, so the test exercises the operator's default wait path.


Was generative AI tooling used to co-author this PR?
  • Yes (Claude Fable 5)

  • 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.

@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Aug 21, 2026

@o-nikolas o-nikolas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One could argue that this is a breaking change since the operator will now exhibit a different behaviour than before (Dags may take longer than they usually do). But I think this fits as bug fix since before the timeout needed to be increased otherwise the operation wouldn't have succeeded anyway, which is the ultimate goal.

Comment thread providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py Outdated
@eladkal

eladkal commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

One could argue that this is a breaking change since the operator will now exhibit a different behaviour than before (Dags may take longer than they usually do). But I think this fits as bug fix since before the timeout needed to be increased otherwise the operation wouldn't have succeeded anyway, which is the ultimate goal.

That merits a warning note at the top of the changelog so can be added to the bugfix release.

Classifier training sometimes takes longer than 20 minutes, but the
operator's default waiter budget was 20 x 60s in both sync and deferrable
paths, so those runs failed with a waiter timeout. Raise the cap to
60 x 60s: the companion sensor and trigger allow 150 minutes, but that is
too large a jump for the operator's implicit wait, so they are left
unchanged. This also lets the system test Dag drop its
wait_for_completion=False workaround, so the test exercises the operator's
default wait path. A changelog warning documents the longer default wait.
@ramitkataria
ramitkataria force-pushed the ramitkataria/fix-comprehend-classifier-waiter-defaults branch from 1593171 to 3b54a66 Compare August 25, 2026 23:10
@vincbeck
vincbeck merged commit 8637df4 into apache:main Aug 26, 2026
80 of 81 checks passed
@vincbeck
vincbeck deleted the ramitkataria/fix-comprehend-classifier-waiter-defaults branch August 26, 2026 13:52
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
…apache#71969)

Classifier training sometimes takes longer than 20 minutes, but the
operator's default waiter budget was 20 x 60s in both sync and deferrable
paths, so those runs failed with a waiter timeout. Raise the cap to
60 x 60s: the companion sensor and trigger allow 150 minutes, but that is
too large a jump for the operator's implicit wait, so they are left
unchanged. This also lets the system test Dag drop its
wait_for_completion=False workaround, so the test exercises the operator's
default wait path. A changelog warning documents the longer default wait.
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.

4 participants