Skip to content

GlueJobCompleteTrigger's verbose branch still treats STOPPED as success, disagreeing with the waiter and the operator #71490

Closed

Description

@amoghrajesh

GlueJobOperator's handling of a Glue job run ending in STOPPED (e.g. cancelled manually from the AWS console, or by this operator's own on_kill) is inconsistent across code paths -- three different answers exist for the same state today:

Path Where STOPPED classified as Result
Deferrable, non-verbose providers/amazon/src/airflow/providers/amazon/aws/waiters/glue.json, waiter job_complete Explicit "state": "failure" acceptor Task fails
Deferrable, verbose GlueJobCompleteTrigger.run()'s hand-rolled polling loop (providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py) Bundled with SUCCEEDED: if job_run_state in ("SUCCEEDED", "STOPPED"): ... "status": "success" Task succeeds
Synchronous GlueJobOperator.poll_until_complete (JOB_RUN_SUCCESS_STATES = ("SUCCEEDED",)) Same bucket as FAILED/TIMEOUT Task fails

The synchronous path was made to agree with the deferrable non-verbose path's waiter as part of #71211 (closing a "self-inflicted stop silently reported as success" gap). The deferrable verbose path was not touched and still disagrees with both -- it's a separate, pre-existing bug in the trigger's custom polling loop, not something #71211 introduced.

Fix direction: make the verbose branch of GlueJobCompleteTrigger.run() treat STOPPED as a failure, matching the waiter used by the non-verbose branch and the operator's own synchronous handling.

Raised during review of #71211: #71211 (comment)

Activity

  1. changed the title [-]GlueJobCompleteTrigger: verbose branch still treats STOPPED as success, disagreeing with the waiter and the operator[/-] [+]GlueJobCompleteTrigger's verbose branch still treats STOPPED as success, disagreeing with the waiter and the operator[/+] on Aug 12, 2026
  2. added
    kind:bug
    provider:amazon
    on Aug 12, 2026
  3. sanket801036 commented on Aug 13, 2026

    @sanket801036

    Hi @amoghrajesh, I'd like to take this one.

    Plan:

    • In GlueJobCompleteTrigger.run()'s verbose polling loop, stop bundling STOPPED with SUCCEEDED — treat it as a failure, matching the job_complete waiter's explicit failure acceptor and GlueJobOperator.poll_until_complete's JOB_RUN_SUCCESS_STATES = ("SUCCEEDED",) from Replace resume_glue_job_on_retry with durable execution for GlueJobOperator #71211.
    • Add/adjust unit tests for the trigger covering the STOPPED state in verbose mode so all three paths agree.

    Could you assign this to me? Thanks!

  4. henry3260 commented on Aug 13, 2026

    @henry3260
    Member

    Hi @amoghrajesh, I'd like to take this one.

    Plan:

    • In GlueJobCompleteTrigger.run()'s verbose polling loop, stop bundling STOPPED with SUCCEEDED — treat it as a failure, matching the job_complete waiter's explicit failure acceptor and GlueJobOperator.poll_until_complete's JOB_RUN_SUCCESS_STATES = ("SUCCEEDED",) from Replace resume_glue_job_on_retry with durable execution for GlueJobOperator #71211.
    • Add/adjust unit tests for the trigger covering the STOPPED state in verbose mode so all three paths agree.

    Could you assign this to me? Thanks!

    Hi @sanket801036! According to our policy, there’s no need to be assigned you can just raise a PR directly :)
    FYI: https://github.com/apache/airflow/blob/main/contributing-docs/18_contribution_workflow.rst

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providersgood first issuekind:bugprovider:amazon

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions