Skip to content

Conversation

@jscheffl
Copy link
Contributor

@jscheffl jscheffl commented Nov 2, 2025

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:

  • Start based on this branch via breeze start-airflow --python 3.12 --load-example-dags --backend postgres --executor LocalExecutor --answer y and 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 via uv pip uninstall WTForms apache-airflow-providers-fab flask_appbuilder flask_babel in 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

@jscheffl jscheffl added this to the Airflow 3.1.3 milestone Nov 2, 2025
@jscheffl jscheffl added type:bug-fix Changelog: Bug Fixes area:UI Related to UI/UX. For Frontend Developers. labels Nov 2, 2025
@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Nov 2, 2025
Copy link
Member

@potiuk potiuk left a 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.

@potiuk
Copy link
Member

potiuk commented Nov 3, 2025

I tested it locally:

Before the fix (main):

  1. run breeze start-airflow --load-example-dags --load-default connections --db-reset
  2. Ctrl-C api-server
  3. unistall fab provider uv pip uninstall ./providers/fab
  4. uninstall wtforms and flask_babel uv pip uninstall wtforms flask_babel flask_appbuilder
root@7a9fe2c838c8:/opt/airflow# uv pip uninstall ./providers/fab/
Using Python 3.10.19 environment at: /usr/python
Uninstalled 1 package in 39ms
 - apache-airflow-providers-fab==3.0.1 (from file:///opt/airflow/providers/fab)
root@7a9fe2c838c8:/opt/airflow# uv pip uninstall wtforms flask_babel flask_appbuilder
Using Python 3.10.19 environment at: /usr/python
Uninstalled 3 packages in 116ms
 - flask-appbuilder==5.0.1
 - flask-babel==4.0.0
 - wtforms==3.2.1
  1. restart api-server (airflow api-server)
  2. try to edit an aws connection and see custom fields

Result:

Screenshot 2025-11-03 at 00 48 05

a lot of errors in log:

flow.providers_manager] loc=providers_manager.py:949
2025-11-02T23:55:11.515303Z [info     ] The hook_class 'airflow.providers.opsgenie.hooks.opsgenie.OpsgenieAlertHook' is not fully initialized (UI widgets will be missing), because the 'flask_appbuilder' package is not installed, however it is not required for Airflow components to work [airflow.providers_manager] loc=providers_manager.py:949
2025-11-02T23:55:11.551442Z [info     ] The hook_class 'airflow.providers.oracle.hooks.oracle.OracleHook' is not fully initialized (UI widgets will be missing), because the 'flask_appbuilder' package is not installed, however it is not required for Airflow components to work [airflow.providers_manager] loc=providers_manager.py:949

After the fix

  1. Checkout 57717 (gh co 57717)
  2. Repeat points 1-6 above

Result:

Screenshot 2025-11-03 at 00 53 23

No errors in log.

(Polish UI ... sorry :) )

@jscheffl
Copy link
Contributor Author

jscheffl commented Nov 3, 2025

(Polish UI ... sorry :) )

Polish UI... cool!

@jscheffl jscheffl merged commit 86c0848 into apache:main Nov 3, 2025
119 checks passed
Copy link
Member

@pierrejeambrun pierrejeambrun left a 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

jscheffl added a commit to jscheffl/airflow that referenced this pull request Nov 4, 2025
…lled (apache#57717)

(cherry picked from commit 86c0848)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
@jscheffl
Copy link
Contributor Author

jscheffl commented Nov 4, 2025

@jscheffl Probably need a backport

Not probably, but seriously. Thanks for the hint, was almost lost in work stack and forgotten. PR linked...

jscheffl added a commit that referenced this pull request Nov 4, 2025
ephraimbuddy pushed a commit that referenced this pull request Nov 10, 2025
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
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 area:providers area:UI Related to UI/UX. For Frontend Developers. type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airbyte Connection Required Fields missing on Airflow 3

3 participants