-
Notifications
You must be signed in to change notification settings - Fork 174
remove duplicate dependencies in API #4796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Unit Test Results664 tests 664 ✅ 8s ⏱️ Results for commit f4c367a. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
| * 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)) |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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