syhstanley opened a new pull request, #64300:
URL: https://github.com/apache/airflow/pull/64300

   Starlette 1.0.0 removed the deprecated \`TemplateResponse(name, context)\`
   signature where \`request\` was passed inside the context dict. This caused
   the API server to crash with \`TypeError: unhashable type: 'dict'\` (HTTP 
500)
   whenever the SPA catch-all route or the simple auth manager UI was served.
   
   **Root cause:** Both \`core_api/app.py\` and \`simple_auth_manager.py\` were
   using the old signature:
   
   \`\`\`python
   # Old (broken on starlette 1.0.0)
   templates.TemplateResponse(
       "/index.html",
       {"request": request, "backend_server_base_url": ...},
   )
   \`\`\`
   
   **Fix:** Update to the current signature (supported since starlette 0.27.0,
   so fully backward-compatible with our \`>=0.45.0\` minimum):
   
   \`\`\`python
   # New (works on starlette 0.45.0 – 1.0.0+)
   templates.TemplateResponse(
       request,
       "/index.html",
       {"backend_server_base_url": ...},
   )
   \`\`\`
   
   Also removes the temporary \`starlette<1\` upper bound added in #64115 and
   its associated comment.
   
   **Tested locally with starlette 1.0.0:**
   - \`airflow-core/tests/unit/api_fastapi/execution_api/test_app.py\` — 7/7 
passed (includes the previously failing \`test_access_api_contract\`)
   - \`airflow-core/tests/unit/api_fastapi/auth/managers/simple/\` — 202/202 
passed
   - \`airflow-core/tests/unit/api_fastapi/core_api/test_security.py\` + auth 
routes — 89/89 passed
   
   closes: #64116
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Claude Code)
   
   <!--
   Generated-by: Claude Code following [the 
guidelines](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: [email protected]

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

Reply via email to