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

manirajv06 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 a38869d5 [YUNIKORN-3433] Send the plugin errors back to core (#1158)
a38869d5 is described below

commit a38869d52bd089404e05b8e733e16b84de36035e
Author: mani <[email protected]>
AuthorDate: Fri Sep 18 14:14:19 2026 +0530

    [YUNIKORN-3433] Send the plugin errors back to core (#1158)
    
    Use errorMessage in PreFilterPredicatesResponse and send it as event to the 
ask in case of any PreFilter predicate failures.
    
    Closes: #1158
    
    Signed-off-by: mani <[email protected]>
---
 go.mod                              | 2 +-
 go.sum                              | 4 ++--
 pkg/mock/predicate_plugin.go        | 5 +++++
 pkg/scheduler/objects/allocation.go | 8 +++++---
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/go.mod b/go.mod
index 60cf5987..ff4dd888 100644
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ module github.com/apache/yunikorn-core
 go 1.26.0
 
 require (
-       github.com/apache/yunikorn-scheduler-interface 
v0.0.0-20260902114836-aee56d9f5e48
+       github.com/apache/yunikorn-scheduler-interface 
v0.0.0-20260917064053-bd4e35e972a4
        github.com/go-ldap/ldap/v3 v3.4.14
        github.com/google/go-cmp v0.7.0
        github.com/google/uuid v1.6.0
diff --git a/go.sum b/go.sum
index 034eef2e..dad401a1 100644
--- a/go.sum
+++ b/go.sum
@@ -2,8 +2,8 @@ github.com/Azure/go-ntlmssp v0.1.1 
h1:l+FM/EEMb0U9QZE7mKNEDw5Mu3mFiaa2GKOoTSsNDP
 github.com/Azure/go-ntlmssp v0.1.1/go.mod 
h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk=
 github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e 
h1:4dAU9FXIyQktpoUAgOJK3OTFc/xug0PCXYCqU0FgDKI=
 github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e/go.mod 
h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
-github.com/apache/yunikorn-scheduler-interface 
v0.0.0-20260902114836-aee56d9f5e48 
h1:l0aoGpXocwRihoXoUgeyi3gu4BbcAeKa0IIxcbseZXA=
-github.com/apache/yunikorn-scheduler-interface 
v0.0.0-20260902114836-aee56d9f5e48/go.mod 
h1:eF8OKdrML/PjpazkpA71nPK1BK8kxvMAi5R+YmwheFg=
+github.com/apache/yunikorn-scheduler-interface 
v0.0.0-20260917064053-bd4e35e972a4 
h1:x0P1kw8uPCuosCTBFSTHXXjaE4nBBg8fxDAMVI4OqYQ=
+github.com/apache/yunikorn-scheduler-interface 
v0.0.0-20260917064053-bd4e35e972a4/go.mod 
h1:yGzF2ElwYisgWrs6FhBuOZWMhgJmHt1wUzHGCky/bQc=
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod 
h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 github.com/cespare/xxhash/v2 v2.3.0 
h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
diff --git a/pkg/mock/predicate_plugin.go b/pkg/mock/predicate_plugin.go
index 1f56c244..f91a58da 100644
--- a/pkg/mock/predicate_plugin.go
+++ b/pkg/mock/predicate_plugin.go
@@ -42,6 +42,11 @@ func (f *PredicatePlugin) PreFilterPredicates(args 
*si.PreFilterPredicatesArgs)
        }
        if f.mustPreFilterFail {
                log.Log(log.Test).Info("fake predicate prefilter plugin fail: 
must fail set")
+               result = &si.PreFilterPredicatesResponse{
+                       Success:       false,
+                       FeasibleNodes: map[string]*si.Empty{},
+                       ErrorMessage:  "fake predicate prefilter plugin failed",
+               }
                return result
        }
        for k, v := range f.nodes {
diff --git a/pkg/scheduler/objects/allocation.go 
b/pkg/scheduler/objects/allocation.go
index 71111e22..716d3c85 100644
--- a/pkg/scheduler/objects/allocation.go
+++ b/pkg/scheduler/objects/allocation.go
@@ -629,12 +629,14 @@ func (a *Allocation) preAllocateConditions(allocate bool) 
(map[string]*si.Empty,
                        AllocationKey: a.allocationKey,
                        Allocate:      allocate,
                }); prefilterResult != nil && !prefilterResult.Success {
+                       predicateErr := prefilterResult.GetErrorMessage()
                        log.Log(log.SchedNode).Debug("running prefilter 
predicates failed",
                                zap.String("allocationKey", a.allocationKey),
-                               zap.Bool("allocate", allocate))
-                       
a.LogAllocationFailure(common.ErrorPreFilterPredicate.Error(), allocate)
+                               zap.Bool("allocate", allocate),
+                               zap.String("predicate error", predicateErr))
+                       a.LogAllocationFailure(predicateErr, allocate)
                        podPredicateErrors := make(map[string]int, 1)
-                       
podPredicateErrors[common.ErrorPreFilterPredicate.Error()]++
+                       podPredicateErrors[predicateErr]++
                        a.SendPredicatesFailedEvent(podPredicateErrors)
                        return prefilterResult.GetFeasibleNodes(), false
                }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to