-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix loading providers hooks fields w/o FAB provider installed #57717
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
Fix loading providers hooks fields w/o FAB provider installed #57717
Conversation
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :) . I thought we can do it indeed.
Polish UI... cool! |
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jscheffl Probably need a backport
…lled (apache#57717) (cherry picked from commit 86c0848) Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
Not probably, but seriously. Thanks for the hint, was almost lost in work stack and forgotten. PR linked... |


closes: #55841
related: #57555 #49446
Sorry that I was not actively enough paying attention that the contributed mocking of provider forms w/o Fab was not working. I thought it was fixed by #49446 and did not test explicitly myself. Raising awareness in the bug #55841 now made me a follow-up fix.
This PR reverts mostly the changes made by #49446 as the original code was "almost" working, just did not consider that mocking the WTForms and FAB classes only works if the modules are really installed. The mock is now extended to mock the modules to tell the system they are available before mocking. If installed just mocks will be applied to load fields, if WTForms, FAB and flask_babel are not installed the system is patched to assume they are existing.
How to test the fix:
Best Option: Patch the single file into an installation and check if it is working
Alternative:
breeze start-airflow --python 3.12 --load-example-dags --backend postgres --executor LocalExecutor --answer yand then log on to the UI. To to admin -> connections and see all is working. No surprise FAB is installed per default. Then log out and stop API server in the tmux panel. Then remove the FAB provider and tooling viauv pip uninstall WTForms apache-airflow-providers-fab flask_appbuilder flask_babelin the panel where API server is stopped. Restart API Server and logon the UI again. Double check that on Admin->Providers the FAB provider is non existing. Then check Admin->Connections and Add a connection if fields are populated, e.g. from Airbyte