jason810496 commented on PR #47062:
URL: https://github.com/apache/airflow/pull/47062#issuecomment-2689803969

   
   
   The rest of CI failures are caused by some side effect of auth_manage with 
FastAPI app, but I still can't figure out what is the root cause:
   
   e.g.
   - 
`tests/api_fastapi/core_api/routes/public/test_assets.py::TestPostAssetMaterialize`
   - 
`tests/api_fastapi/core_api/routes/public/test_task_instances.py::TestGetTaskInstance`
   - 
`tests/api_fastapi/core_api/routes/public/test_task_instances.py::TestGetTaskInstanceTry`
   - 
`tests/api_fastapi/core_api/routes/public/test_task_instances.py::TestGetTaskInstanceTries`
   
   If I remove the `conf_vars`, those test case works well, I have also tried 
with replace `conf_vars` with` try`, `finally` to setup, teardown 
`[core/auth_manager]` config without `with` block and it doesn't help.
   
   ```python
   @pytest.fixture
   def test_client():
       with conf_vars(
           {
               (
                   "core",
                   "auth_manager",
               ): 
"airflow.auth.managers.simple.simple_auth_manager.SimpleAuthManager",
           }
       ):
           yield TestClient(create_app())
   ```
   
   Only `session.commit` explicitly can resolve this case ( bring out by 
@rawwar in #47136 )
   cc @pierrejeambrun 
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to