This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-8772-3ba45ee5a5f641388d1a9eda90afa26a62d70d30
in repository https://gitbox.apache.org/repos/asf/texera.git

commit a2b8da89ebb9610cb35d3d3fe4f3ee41b582d70e
Author: Suryaa Charan <[email protected]>
AuthorDate: Wed Oct 21 19:08:56 2026 +0000

    feat(computing-unit-managing-service): say how to free a slot when the CU 
quota is reached (#8772)
    
    ### What changes were proposed in this PR?
    
    When a user hits the computing unit limit, the error only said "You may
    only have N computing-unit(s) running at the same time". It now adds
    what to do: "Reuse a running computing unit, terminate a cloud unit, or
    disconnect a local unit you no longer need." Local units count toward
    the limit too, and the UI removes them with "Disconnect", which calls
    the same terminate endpoint and frees the slot.
    
    ### Any related issues, documentation, discussions?
    
    Part of #8736. Split out of #8737.
    
    ### How was this PR tested?
    
    Updated `ComputingUnitManagingServiceExceptionSpec`.
    
    ```
    sbt "ComputingUnitManagingService/testOnly 
org.apache.texera.service.util.ComputingUnitManagingServiceExceptionSpec" 
"ComputingUnitManagingService/scalafmtCheck" 
"ComputingUnitManagingService/Test/scalafmtCheck"
    ```
    
    There's no screenshot because this error only appears on a Kubernetes
    deployment, and I tested on a local install.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 5.5)
    
    ---------
    
    Co-authored-by: suryaacharan <[email protected]>
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 .../texera/service/util/ComputingUnitManagingServiceException.scala  | 3 ++-
 .../service/util/ComputingUnitManagingServiceExceptionSpec.scala     | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitManagingServiceException.scala
 
b/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitManagingServiceException.scala
index 22660113e9..2bcf60ed1c 100644
--- 
a/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitManagingServiceException.scala
+++ 
b/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitManagingServiceException.scala
@@ -37,7 +37,8 @@ final case class InsufficientComputingResource(resourceType: 
String)
 // User has reached the per-user CU-quota (number of running units)
 final case class InsufficientComputingUnitQuota(maxNumberOfComputingUnit: Int)
     extends ComputingUnitManagingServiceException(
-      s"You may only have $maxNumberOfComputingUnit computing-unit(s) running 
at the same time"
+      s"You may only have $maxNumberOfComputingUnit computing unit(s) running 
at the same time. " +
+        "Reuse a running computing unit, terminate a Kubernetes unit, or 
disconnect a local unit you no longer need."
     )
 
 // default exception fallback
diff --git 
a/computing-unit-managing-service/src/test/scala/org/apache/texera/service/util/ComputingUnitManagingServiceExceptionSpec.scala
 
b/computing-unit-managing-service/src/test/scala/org/apache/texera/service/util/ComputingUnitManagingServiceExceptionSpec.scala
index 2e95eeece4..9a0c619b34 100644
--- 
a/computing-unit-managing-service/src/test/scala/org/apache/texera/service/util/ComputingUnitManagingServiceExceptionSpec.scala
+++ 
b/computing-unit-managing-service/src/test/scala/org/apache/texera/service/util/ComputingUnitManagingServiceExceptionSpec.scala
@@ -33,9 +33,10 @@ class ComputingUnitManagingServiceExceptionSpec extends 
AnyFlatSpec with Matcher
       "Insufficient CPU available in the server. Please decrease the requested 
amount or try again later."
   }
 
-  "InsufficientComputingUnitQuota" should "render the quota message" in {
+  "InsufficientComputingUnitQuota" should "render the quota message and how to 
free a slot" in {
     InsufficientComputingUnitQuota(3).getMessage shouldBe
-      "You may only have 3 computing-unit(s) running at the same time"
+      "You may only have 3 computing unit(s) running at the same time. " +
+        "Reuse a running computing unit, terminate a Kubernetes unit, or 
disconnect a local unit you no longer need."
   }
 
   "InternalError" should "default to a generic message" in {

Reply via email to