Repository navigation
refactor(frontend): remove dead admin file-endpoint clients - #9086
aglinxinyuan merged 2 commits into
Conversation
getUploadedFiles and getAccessFiles have had no caller since apache#2781 removed the file feature and its /admin/user endpoints, and the dataset_size/uploaded_dataset URL constants lost their readers in apache#2680 (the backend never served either path under /admin/user). Remove the clients, the four constants and the now-unused File import, plus the spec cases that only exercised them.
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9086 +/- ##
============================================
- Coverage 92.34% 92.30% -0.04%
+ Complexity 5046 5045 -1
============================================
Files 1261 1260 -1
Lines 54117 53895 -222
Branches 6767 6725 -42
============================================
- Hits 49973 49750 -223
- Misses 2485 2486 +1
Partials 1659 1659
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
Review effort: Lite
What changes were proposed in this PR?
Removes
AdminUserServiceclients for admin endpoints that no longer exist, or never did. +1/−35 lines. There is no behaviour change.getUploadedFiles/USER_CREATED_FILES(/admin/user/uploaded_files) andgetAccessFiles/USER_ACCESS_FILES(/admin/user/access_files): no production caller, and the backend endpoints are gone, so any call would 404.USER_UPLOADED_DATASE_SIZE(/admin/user/dataset_size) andUSER_UPLOADED_DATASET_COUNT(/admin/user/uploaded_dataset): no references at all. Neither path was ever served under/admin/user; the dataset-size endpoint lived under/quota.Filetype import, which only the removed methods used.Fileitself stays;UserQuotaComponentstill imports it.The spec drops the two cases and two error-propagation rows that only exercised the removed methods.
History
They have been unused for over two years.
Any related issues, documentation, discussions?
Closes #9083
How was this PR tested?
No new tests.
From
frontend/:npx ng test --watch=false --include='**/admin-user.service.spec.ts' --include='**/admin-user.component.spec.ts' --include='**/user-quota.component.spec.ts': 3 files, 97 tests, all pass. The last two specs cover the service's consumers.npx tsc --noEmit -p src/tsconfig.app.jsonand-p src/tsconfig.spec.json: clean.yarn format:ci: clean.npx ng build: success.To re-check:
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with Claude Code