Skip to content

GlueJobOperator in deffered mode does not return error message #64095

Closed

Description

@simonjobs

Apache Airflow version

main (development)

If "Other Airflow 3 version" selected, which one?

No response

What happened?

We are using on_failure_callback with a custom implemented function that extracts the error message from the context of a failed task and posts it as a card to our Teams channel. exception = context.get('exception')

When a glue job fails while the task is in deferred status it will only pick up that the state has failed and our callback simply extracts "Trigger failure".

This is an issue because in our Teams error notifications we want to immediately be able to see the high level cause of failure. Currently we would need to either go to Glue logs directly or via the Airflow logs.

What you think should happen instead?

The error message from the Glue job should be picked up and passed to the operator, written to logs and available in context for use with callback functions.

How to reproduce

  1. Create a Glue job that raises an error message.
  2. Create a DAG that triggers above job using GlueJobOperator in deferred mode.
  3. Run DAG
  4. DAG will fail with error "Trigger failure"

Operating System

MWAA 2.10.3

Versions of Apache Airflow Providers

MWAA 2.10.3

Deployment

Amazon (AWS) MWAA

Deployment details

No response

Anything else?

First raised in #63706

Work already started in #64085

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on Mar 23, 2026

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  2. yamakazushi commented on Mar 23, 2026

    @yamakazushi
    Contributor

    Could you please assign this issue to me?

  3. simonjobs commented on Mar 23, 2026

    @simonjobs
    Author

    @yamakzsh

    Work has already been picked up by @shivaam in #64085 please align with him first.

  4. yamakazushi commented on Mar 23, 2026

    @yamakazushi
    Contributor

    got it, so I'll leave it to him.

  5. added theissue type on Mar 25, 2026
  6. added
    priority:mediumBug that should be fixed before next release but would not block a release
    on Mar 25, 2026
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:corearea:providerskind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseprovider:amazonAWS/Amazon - related issues

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions