Conversation
Unit Test Results669 tests 669 ✅ 8s ⏱️ Results for commit d7db59f. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR resolves duplicate authentication dependency declarations in FastAPI endpoints by removing redundant dependency specifications at the endpoint level when they're already declared at the router level. According to FastAPI behavior, dependencies declared both at router and endpoint levels are executed twice, causing unnecessary duplicate authentication checks.
Key Changes:
- Removed duplicate auth dependencies from endpoint decorators across multiple route files
- Incremented API version from 0.25.7 to 0.25.8 (PATCH version)
- Updated CHANGELOG.md with bug fix entry
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| api_app/api/routes/workspaces.py | Removed duplicate get_current_workspace_owner_or_researcher_user_or_airlock_manager from two GET endpoints that already inherit this dependency from the router |
| api_app/api/routes/workspace_service_templates.py | Removed duplicate get_current_tre_user_or_tre_admin from two GET endpoints that already inherit this dependency from the router |
| api_app/api/routes/user_resource_templates.py | Removed duplicate get_current_tre_user_or_tre_admin from two GET endpoints that already inherit this dependency from the router |
| api_app/api/routes/shared_services.py | Removed duplicate get_current_tre_user_or_tre_admin from two GET endpoints while preserving it in function signatures where needed for business logic |
| api_app/api/routes/shared_service_templates.py | Removed duplicate get_current_tre_user_or_tre_admin from one GET endpoint that already inherits this dependency from the router |
| api_app/_version.py | Incremented API version from 0.25.7 to 0.25.8 following semantic versioning for bug fixes |
| CHANGELOG.md | Added bug fix entry documenting the removal of duplicate auth dependencies |
CHANGELOG.md
Outdated
| * Add timeouts to Graph requests in API ([#4723](https://github.com/microsoft/AzureTRE/issues/4723)) | ||
| * Fix missing metastoreDomains for Databricks, which caused metastore outages for some domains ([#4779](https://github.com/microsoft/AzureTRE/issues/4779)) | ||
| * Fix cost display duplication when user resource is deleted - UI incorrectly reused cost data for remaining resources ([#4783](https://github.com/microsoft/AzureTRE/issues/4783)) | ||
| * Remove duplicate auth dependencies in API ([#4796](https://github.com/microsoft/AzureTRE/pull/4796)) |
There was a problem hiding this comment.
The reference should point to issue #4797 instead of PR #4796. The PR description states "Resolves #4797", so the changelog entry should reference the issue number to maintain consistency with the format used in other entries.
| * Remove duplicate auth dependencies in API ([#4796](https://github.com/microsoft/AzureTRE/pull/4796)) | |
| * Remove duplicate auth dependencies in API ([#4797](https://github.com/microsoft/AzureTRE/issues/4797)) |
Resolves #4797
What is being addressed
Dependencies are duplicated which would cause auth checks to run twice
How is this addressed