Skip to content

Allow back script_location in Glue to be None *again* #24753

@jbvsmo

Description

@jbvsmo

Apache Airflow version

2.3.2 (latest released)

What happened

On this commit someone broke the AWS Glue provider by enforcing the script_location to be a string:
27b77d3

Then someone realized that (see comment thread there) and created a new PR to allow None to be parsed again here: #23357

But the parameters no longer have the Optional[str] typing and now the error persists with this traceback:

  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/amazon/aws/operators/glue.py", line 163, in __init__
    super().__init__(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/baseoperator.py", line 373, in apply_defaults
    raise AirflowException(f"missing keyword argument {missing_args.pop()!r}")
airflow.exceptions.AirflowException: missing keyword argument 'script_location'

What you think should happen instead

Please revert the change and add Optional[str] here: https://github.com/apache/airflow/blob/main/airflow/providers/amazon/aws/operators/glue.py#L69

How to reproduce

Use the class without a script_location

Operating System

Linux

Versions of Apache Airflow Providers

Apache airflow 2.3.2

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions