Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Jan 6, 2024

Breeze auto-detects if it should upgrade itself - based on finding Airflow directory it is in and calculating the hash of the pyproject.toml it uses. Finding the airflow sources to act on was using setup.cfg from Airflow and checking the package name inside, but since we are about to remove setup.cfg, and move all project configuration to pyproject.toml (see #36537), this mechanism will stop working.

This PR changes it by just checking if airflow subdir is present, and contains __init__.py with "airflow" inside. That should be "good enough" and fast, and also it should be backwards compatible in case new Breeze is used in older airflow sources.


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

@potiuk potiuk requested a review from jscheffl January 6, 2024 16:40
@potiuk potiuk force-pushed the change-airflow-folder-detection-in-breeze branch from a6f7858 to dfbcf3d Compare January 6, 2024 16:42
Breeze auto-detects if it should upgrade itself - based on
finding Airflow directory it is in and calculating the hash of
the pyproject.toml it uses. Finding the airflow sources to
act on was using setup.cfg from Airflow and checking the package
name inside, but since we are about to remove setup.cfg, and
move all project configuration to pyproject.toml (see apache#36537), this
mechanism will stop working.

This PR changes it by just checking if `airflow` subdir is present,
and contains `__init__.py` with "airflow" inside. That should be
"good enough" and fast, and also it should be backwards compatible
in case new Breeze is used in older airflow sources.
@potiuk potiuk force-pushed the change-airflow-folder-detection-in-breeze branch from dfbcf3d to da45498 Compare January 6, 2024 16:47
@potiuk potiuk added this to the Airflow 2.8.1 milestone Jan 6, 2024
@potiuk potiuk added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jan 6, 2024
@potiuk potiuk merged commit c5de0db into apache:main Jan 6, 2024
@potiuk potiuk deleted the change-airflow-folder-detection-in-breeze branch January 6, 2024 17:38
ephraimbuddy pushed a commit that referenced this pull request Jan 11, 2024
Breeze auto-detects if it should upgrade itself - based on
finding Airflow directory it is in and calculating the hash of
the pyproject.toml it uses. Finding the airflow sources to
act on was using setup.cfg from Airflow and checking the package
name inside, but since we are about to remove setup.cfg, and
move all project configuration to pyproject.toml (see #36537), this
mechanism will stop working.

This PR changes it by just checking if `airflow` subdir is present,
and contains `__init__.py` with "airflow" inside. That should be
"good enough" and fast, and also it should be backwards compatible
in case new Breeze is used in older airflow sources.

(cherry picked from commit c5de0db)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants