You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Nishieee (via GitHub)" <gi...@apache.org> on 2026/06/12 00:18:52 UTC
[PR] Fix FAB roles/users 500 caused by connection hook metadata mocks [airflow]
Nishieee opened a new pull request, #68421:
URL: https://github.com/apache/airflow/pull/68421
## summary
fixes [[#68354](https://github.com/apache/airflow/issues/68354)](https://github.com/apache/airflow/issues/68354): FAB Security Roles/Users pages could 500 with `TypeError: ... MockAnyWidget` when `/ui/connections/hook_meta` ran concurrently in the same api-server process.
**cause:** `HookMetaService._get_hooks_with_mocked_fab()` used a global `mock.patch` on `BS3TextFieldWidget`. the guard checked `"wtforms.StringField" not in sys.modules`, which is always true (that submodule path is never registered), so the mock was applied even when FAB was already loaded.
**fix:** `hook_meta_data()` now uses `ProvidersManager` directly, with no runtime mocks. the guard is corrected to `"wtforms" not in sys.modules`.
**tests:** two regression tests added in `test_connections.py` (run with `--skip-db-tests`) verifying `BS3TextFieldWidget` is unchanged after both `hook_meta_data()` and `_get_hooks_with_mocked_fab()`.
closes: #68354
---
**Was generative AI tooling used to co-author this PR?**
- [x] yes - Cursor (Auto)
Generated-by: Cursor (Auto), following [[the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix FAB roles/users 500 caused by connection hook metadata mocks [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #68421:
URL: https://github.com/apache/airflow/pull/68421
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix FAB roles/users 500 caused by connection hook metadata mocks [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on PR #68421:
URL: https://github.com/apache/airflow/pull/68421#issuecomment-4769117475
If I understood correctly yes, the issue no longer exist in main
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix FAB roles/users 500 caused by connection hook metadata mocks [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #68421:
URL: https://github.com/apache/airflow/pull/68421#issuecomment-4761312302
@vincbeck just to clarify. This fix is targeting 3.2 test is this expected? We don't have this issue in main?
cc @vatsrahul1001
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix FAB roles/users 500 caused by connection hook metadata mocks [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #68421:
URL: https://github.com/apache/airflow/pull/68421#discussion_r3403941730
##########
airflow-core/newsfragments/68354.bugfix.rst:
##########
@@ -0,0 +1 @@
+Fix FAB roles and users admin pages returning 500 when connection hook metadata is loaded concurrently
Review Comment:
No need
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org