Skip to content

Conversation

@pierrejeambrun
Copy link
Member

@pierrejeambrun pierrejeambrun commented Apr 18, 2025

#47588 introduces a dependency on fab provider from core. (or its transitive dependencies wtforms flask_babel flask_appbuilder). This makes sure that the monkey patching only occurs when modules are installed. Also this passed the CI, I assume it means there's no API test suite without fab provider installed ?

We are trying to patch modules that aren't there in the first place. This can happen if fab provider is not installed.

To reproduce, just go into airflow-core, uv sync --no-dev (fab provider should not be there), then start airflow api-server and go to the connection page in the UI.

To be honest this might be enough to cancel rc3 in my opinion as connection page in the UI will be broken for anybody that does not have the fab-provider installed. @kaxil I’ll wait for a discussion before casting my vote.

Before

Screenshot 2025-04-18 at 23 35 38 Screenshot 2025-04-18 at 23 35 19

After

Screenshot 2025-04-18 at 23 34 26

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Apr 18, 2025
@pierrejeambrun
Copy link
Member Author

pierrejeambrun commented Apr 18, 2025

@jscheffl
Copy link
Contributor

Args, with the mocking I added the target was actually to be independent of FAB. But at time of implementation FAB still was mandatory... so maybe this had not been tested sufficiently... sorry.

I am still on the move, will be home by tomorrow evening. Earliest Sunday I'm able to really review and understand. WHat is the outcome if the exception is catched because dependencies are missing? Will just be no element displayed?

dstandish added a commit to astronomer/airflow that referenced this pull request Apr 18, 2025
…s route

Not sure why this was added, or if it still serves any purpose, but for the core to not depend on flask appbuilder, we can't have code that tries to patch it.

Alternative to apache#49446
@dstandish
Copy link
Contributor

Here's an alternative that just rips out the mocking. Seems to work with my local testing.

#49448

dstandish added a commit to astronomer/airflow that referenced this pull request Apr 18, 2025
…s route

Not sure why this was added, or if it still serves any purpose, but for the core to not depend on flask appbuilder, we can't have code that tries to patch it.

Alternative to apache#49446
@pierrejeambrun
Copy link
Member Author

What is the outcome if the exception is catched because dependencies are missing? Will just be no element displayed?

As I understand if the element is missing (module not installed) it means that no provider depends on fab provider, which means that no get_connection_from_widgets depends on it (for instance wtform widgets). Therefore yes the widged will not be there, but no connection form acatually use it, so it shouldn't cause trouble, to my understanding.

Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

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

Will do for 3.0

@ashb ashb merged commit abd6b30 into apache:main Apr 19, 2025
96 checks passed
@ashb ashb deleted the fix-connection-meta-when-fab-provider-is-missing branch April 19, 2025 07:07
ashb pushed a commit that referenced this pull request Apr 19, 2025
@jscheffl
Copy link
Contributor

Thanks for the fix! I am very Sorry this caused RC4 :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants