Skip to content

feat(computing-unit-managing-service): let admins terminate any computing unit - #7337

Merged
aicam merged 1 commit into
apache:mainfrom
kunwp1:feat/admin-cu-terminate
Aug 5, 2026
Merged

feat(computing-unit-managing-service): let admins terminate any computing unit#7337
aicam merged 1 commit into
apache:mainfrom
kunwp1:feat/admin-cu-terminate

Conversation

@kunwp1

@kunwp1 kunwp1 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Admins can now terminate any computing unit, not just their own.

terminateComputingUnit gated on ownership alone. This PR relaxes that guard so an ADMIN passes it.

Any related issues, documentation, discussions?

Closes #6478.

How was this PR tested?

Added tests in ComputingUnitManagingResourceSpec

Run: sbt "ComputingUnitManagingService/testOnly *ComputingUnitManagingResourceSpec"

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

Generated-by: Claude Code (Opus 4.8)

…ting unit

Add an ADMIN bypass to terminateComputingUnit's owner guard: admins may
terminate any unit, everyone else must still own it. A nonexistent cuid still
404s. Other owner-gated mutators (rename, /metrics, /limits) are unchanged.

Adds the first terminateComputingUnit tests (admin-on-others, non-admin-denied,
owner, nonexistent) and updates the AdminComputingUnitResource TODO.

Closes apache#6478.
@github-actions

github-actions Bot commented Aug 5, 2026

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 feature platform Non-amber Scala service paths labels Aug 5, 2026
@codecov-commenter

codecov-commenter commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.43%. Comparing base (b1d51ae) to head (bef4da9).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7337      +/-   ##
============================================
+ Coverage     83.42%   83.43%   +0.01%     
- Complexity     4137     4142       +5     
============================================
  Files          1167     1167              
  Lines         46443    46443              
  Branches       5174     5174              
============================================
+ Hits          38743    38750       +7     
+ Misses         5985     5979       -6     
+ Partials       1715     1714       -1     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 83.65% <ø> (ø) Carriedforward from b1d51ae
amber 80.71% <ø> (ø) Carriedforward from b1d51ae
computing-unit-managing-service 50.72% <100.00%> (+1.69%) ⬆️
config-service 65.97% <ø> (ø)
file-service 69.05% <ø> (ø)
frontend 84.03% <ø> (ø) Carriedforward from b1d51ae
notebook-migration-service 78.89% <ø> (ø)
pyamber 97.36% <ø> (ø) Carriedforward from b1d51ae
workflow-compiling-service 26.31% <ø> (ø)

*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.

@aicam aicam 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.

LGTM!

@aicam
aicam added this pull request to the merge queue Aug 5, 2026
Merged via the queue into apache:main with commit f46b2a7 Aug 5, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin CUs: allow admins to terminate any computing unit

3 participants