This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git
The following commit(s) were added to refs/heads/master by this push:
new cf19bd20 [YUNIKORN-2262] propagate the error message when queue
creation gets failed (#918)
cf19bd20 is described below
commit cf19bd20d19cd81338f880a84be340cac6233652
Author: 0lai0 <[email protected]>
AuthorDate: Thu Jul 25 18:50:39 2024 +0800
[YUNIKORN-2262] propagate the error message when queue creation gets failed
(#918)
Closes: #918
Signed-off-by: Chia-Ping Tsai <[email protected]>
---
pkg/scheduler/partition.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pkg/scheduler/partition.go b/pkg/scheduler/partition.go
index c7677b16..a3395549 100644
--- a/pkg/scheduler/partition.go
+++ b/pkg/scheduler/partition.go
@@ -20,6 +20,7 @@ package scheduler
import (
"context"
+ "errors"
"fmt"
"math"
"strconv"
@@ -324,12 +325,12 @@ func (pc *PartitionContext) AddApplication(app
*objects.Application) error {
if isRecoveryQueue {
queue, err = pc.createRecoveryQueue()
if err != nil {
- return fmt.Errorf("failed to create recovery
queue %s for application %s", common.RecoveryQueueFull, appID)
+ return errors.Join(fmt.Errorf("failed to create
recovery queue %s for application %s", common.RecoveryQueueFull, appID), err)
}
} else {
queue, err = pc.createQueue(queueName, app.GetUser())
if err != nil {
- return fmt.Errorf("failed to create rule based
queue %s for application %s", queueName, appID)
+ return errors.Join(fmt.Errorf("failed to create
rule based queue %s for application %s", queueName, appID), err)
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]