Skip to content

Conversation

@o-nikolas
Copy link
Contributor

@o-nikolas o-nikolas commented Apr 17, 2024

Import the aws executors in the __init__.py module of their respective directories so that they can be imported with a shorter and more natural looking module path.

For example, this modules path:

airflow.providers.amazon.aws.executors.batch.batch_executor.AwsBatchExecutor

Becomes:

airflow.providers.amazon.aws.executors.batch.AwsBatchExecutor

fixes #38524


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Import the aws executors in the __init__.py module of their
respective directories so that they can be imported with a shorter and
more natural looking module path.

For example, this modules path:

`airflow.providers.amazon.aws.executors.batch.batch_executor.AwsBatchExecutor`

Becomes:

`airflow.providers.amazon.aws.executors.batch.AwsBatchExecutor`
@o-nikolas o-nikolas requested a review from eladkal as a code owner April 17, 2024 17:56
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Apr 17, 2024
Copy link
Contributor

@dirrao dirrao left a comment

Choose a reason for hiding this comment

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

LGTM. It's worth to add unit test with shorter path.

@Taragolis
Copy link
Contributor

Just an idea, maybe move it into the package root and make it lazy-loaded thought PEP-562, e.g. the same way as if does into the:

@o-nikolas o-nikolas merged commit 4b9b400 into apache:main Apr 18, 2024
@o-nikolas o-nikolas deleted the onikolas/aws_executors_module_path branch April 18, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants