Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AIP-44 configuration from the code #44454

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Nov 28, 2024

This change removes all configuration that controls AIP-44 behaviour. It does not yet remove all the related code, this will be a follow up but it removes all the controls that determine if AIP-44 is enabled or not and removes all the Traceback Session/Disabling of DB session modifications that were used in "database isolation" mode. The "database isolation" mode has been disabled in #44441 so there was no easy way to enable it anyoway - this change removes the capability to use database isolation mode completely.

Part of #44436


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

@boring-cyborg boring-cyborg bot added area:CLI area:core-operators Operators, Sensors and hooks within Core Airflow area:dev-tools area:Executors-core LocalExecutor & SequentialExecutor area:providers area:Scheduler including HA (high availability) scheduler area:serialization area:webserver Webserver related Issues provider:celery provider:edge Edge Executor / Worker (AIP-69) provider:standard labels Nov 28, 2024
@potiuk potiuk force-pushed the remove-aip-44-configuration branch from 75c243a to a071c24 Compare November 28, 2024 15:55
This change removes all configuration that controls AIP-44 behaviour.
It does not yet remove all the related code, this will be a follow up
but it removes all the controls that determine if AIP-44 is enabled or
not and removes all the Traceback Session/Disabling of DB session
modifications that were used in "database isolation" mode. The
"database isolation" mode has been disabled in apache#44441 so there was no
easy way to enable it anyoway - this change removes the capability
to use database isolation mode completely.

Part of apache#44436
@potiuk potiuk force-pushed the remove-aip-44-configuration branch from a071c24 to 0819cf3 Compare November 28, 2024 16:27
@potiuk
Copy link
Member Author

potiuk commented Nov 28, 2024

K8S tests failure unrelated (work in progress to fix them). Merging.

@potiuk potiuk merged commit e9f544c into apache:main Nov 28, 2024
95 of 97 checks passed
@potiuk potiuk deleted the remove-aip-44-configuration branch November 28, 2024 17:29
potiuk added a commit to potiuk/airflow that referenced this pull request Nov 28, 2024
Ruff team is using Airflow as one of the "ecosystem" benchmarks
for new rules they developed and reported the issues to us in
the apache#44455 discussion. This PR addresses those issues that are still
there (some of the reported tests were removed earlier today when
we removed AIP-44 code in apache#44454
potiuk added a commit that referenced this pull request Nov 28, 2024
Ruff team is using Airflow as one of the "ecosystem" benchmarks
for new rules they developed and reported the issues to us in
the #44455 discussion. This PR addresses those issues that are still
there (some of the reported tests were removed earlier today when
we removed AIP-44 code in #44454
Comment on lines -77 to -79
os.environ["AIRFLOW_ENABLE_AIP_44"] = "True"
os.environ["AIRFLOW__CORE__INTERNAL_API_URL"] = api_url
InternalApiConfig.set_use_internal_api("edge-worker")
Copy link
Contributor

Choose a reason for hiding this comment

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

Args. This was a bit tooo much removal ... because if this removed the start now fails in airflow/executors/executor_loader.py:validate_database_executor_compatibility() with error: cannot use SQLite with the...

Copy link
Member Author

Choose a reason for hiding this comment

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

But should not edge worker be independent of database used?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it should. Theproblem is that in Airflow 2.10 there is a bit of validation at point of CLI parsing which impliocitly invokes ExecutorLoader and this indirectly checks for which executor is used and this is compatible in regards of SQLite. This patching was needed to work-around these validations.

As of the removal - which totally make sense in main/Airflow 3 - the entrypoint was broken in Airflow 2.10 which we do not clean or repair at this stage. Scratched my head 2 hours yesterday trying to make it / restore it such that it is working with Airflow 2.10 again.

I did not complete a deployment test with Airflow 2.10 and Edge Executor, really running a CLI worker in the CI together with the server... individually all Unit tests are working but you see how it is broken if you call breeze down && breeze release-management prepare-provider-packages --include-not-ready-providers edge && breeze start-airflow --python 3.12 --load-example-dags --backend postgres --executor EdgeExecutor --answer y --use-airflow-version 2.10.3 --use-packages-from-dist

Copy link
Member Author

Choose a reason for hiding this comment

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

See #44494 (comment)

I think we are technically at the FORK time. This is the time when we know Edge executor in main will not work in 2.10. And if you need to make it works, forking from "just before we started to remove AIP-44" by Bosh team and backporting the main changes to edge executor to make it works for "2.10" version maintained by Bosh is the right thing to do.

Copy link
Contributor

Choose a reason for hiding this comment

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

I hope we are not the only ones using... and I hope we don't need to fork. At least now with #44434 I made it working again. Added a layer to abstact the backend and hope that we can make it working with AIP-72 as well. I do not see much redundancy and atm I see it beneficial keeping one source w/o fork.

Anyway, will now pick some tasks and help cleaning the AIP-44 beach :-D

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. If we can fix it ... Cool :)

LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 2025
This change removes all configuration that controls AIP-44 behaviour.
It does not yet remove all the related code, this will be a follow up
but it removes all the controls that determine if AIP-44 is enabled or
not and removes all the Traceback Session/Disabling of DB session
modifications that were used in "database isolation" mode. The
"database isolation" mode has been disabled in apache#44441 so there was no
easy way to enable it anyoway - this change removes the capability
to use database isolation mode completely.

Part of apache#44436
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 2025
…e#44460)

Ruff team is using Airflow as one of the "ecosystem" benchmarks
for new rules they developed and reported the issues to us in
the apache#44455 discussion. This PR addresses those issues that are still
there (some of the reported tests were removed earlier today when
we removed AIP-44 code in apache#44454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI area:core-operators Operators, Sensors and hooks within Core Airflow area:dev-tools area:Executors-core LocalExecutor & SequentialExecutor area:providers area:Scheduler including HA (high availability) scheduler area:serialization area:webserver Webserver related Issues provider:celery provider:edge Edge Executor / Worker (AIP-69) provider:standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants