Skip to content

refactor(frontend): remove dead admin file-endpoint clients - #9086

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/fe-admin-user-file-endpoints
Oct 24, 2026
Merged

aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/fe-admin-user-file-endpoints

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes AdminUserService clients 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) and getAccessFiles / 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) and USER_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.
  • The File type import, which only the removed methods used. File itself stays; UserQuotaComponent still imports it.

The spec drops the two cases and two error-propagation rows that only exercised the removed methods.

History

Introduced by #2194 (2023-10-29), "User quota dashboard frontend": the two file clients. #2615 (2024-05-08), "Add Dataset-related statistics to Quota Dashboard": the two dataset constants
Usage removed by #2781 (2024-08-20), "Remove File-Related Components", which removed the file clients' callers and their backend endpoints. #2680 (2024-07-23), "Adding quota statisitc visualization", which removed the dataset constants' readers

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.json and -p src/tsconfig.spec.json: clean.
  • yarn format:ci: clean.
  • npx ng build: success.

To re-check:

git grep -n -w -E 'getUploadedFiles|getAccessFiles|uploaded_files|access_files|dataset_size|uploaded_dataset'   # no hits

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

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.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 00:16
@aglinxinyuan aglinxinyuan self-assigned this Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aglinxinyuan aglinxinyuan changed the title refactor(frontend): remove dead admin user-file endpoint clients refactor(frontend): remove dead admin file-endpoint clients Oct 22, 2026
@aglinxinyuan
aglinxinyuan requested a review from kunwp1 October 22, 2026 00:25
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@github-actions github-actions Bot added refactor Refactor the code frontend Changes related to the frontend GUI labels Oct 22, 2026
@aglinxinyuan
aglinxinyuan requested a review from mengw15 October 22, 2026 02:01
@codecov-commenter

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.30%. Comparing base (6cfcfb1) to head (eab3834).
⚠️ Report is 1 commits behind head on main.

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              
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from 6a101ad
agent-service 99.16% <ø> (ø) Carriedforward from 6a101ad
amber 87.31% <ø> (-0.01%) ⬇️ Carriedforward from 6a101ad
computing-unit-managing-service 60.48% <ø> (ø) Carriedforward from 6a101ad
config-service 87.37% <ø> (ø) Carriedforward from 6a101ad
file-service 82.00% <ø> (ø) Carriedforward from 6a101ad
frontend 96.55% <ø> (-0.01%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 6a101ad
pyamber 98.53% <ø> (-0.05%) ⬇️ Carriedforward from 6a101ad
workflow-compiling-service 72.43% <ø> (ø) Carriedforward from 6a101ad

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kunwp1
kunwp1 requested a lite review from Copilot October 22, 2026 17:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Oct 24, 2026
Merged via the queue into apache:main with commit caea036 Oct 24, 2026
23 checks passed
@aglinxinyuan
aglinxinyuan deleted the refactor/fe-admin-user-file-endpoints branch October 24, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dead admin user-file endpoint clients

4 participants