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

wilfred-s pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git


The following commit(s) were added to refs/heads/branch-1.9 by this push:
     new 55f14ec5 [YUNIKORN-3312] fix logger setup in core (#1100)
55f14ec5 is described below

commit 55f14ec5af5f76a5e7ff0204429b8a77e4618513
Author: Wilfred Spiegelenburg <[email protected]>
AuthorDate: Tue Jun 30 17:27:54 2026 +0530

    [YUNIKORN-3312] fix logger setup in core (#1100)
    
    Fix the duplicate index for the preemption loggers. Add the new
    preemption logger to the list of known log handles.
    Fix the unit tests to take into account the extra logger.
    
    Closes: #1100
    
    Signed-off-by: mani <[email protected]>
    (cherry picked from commit 2554ab05bc80336456bfedac31c65916d55cdde5)
---
 pkg/log/logger.go      | 5 +++--
 pkg/log/logger_test.go | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pkg/log/logger.go b/pkg/log/logger.go
index 0c1f5388..1762def4 100644
--- a/pkg/log/logger.go
+++ b/pkg/log/logger.go
@@ -84,14 +84,15 @@ var (
        Utils                       = &LoggerHandle{id: 27, name: "core.utils"}
        Diagnostics                 = &LoggerHandle{id: 28, name: 
"core.diagnostics"}
        SchedQuotaChangePreemption  = &LoggerHandle{id: 29, name: 
"core.scheduler.preemption.quotachange"}
-       SchedRequiredNodePreemption = &LoggerHandle{id: 29, name: 
"core.scheduler.preemption.requirednode"}
+       SchedRequiredNodePreemption = &LoggerHandle{id: 30, name: 
"core.scheduler.preemption.requirednode"}
 )
 
 // this tracks all the known logger handles, used to preallocate the real 
logger instances when configuration changes
 var loggers = []*LoggerHandle{
        Core, Test, Deprecation, Config, Entrypoint, Events, OpenTracing, 
Resources, REST, RMProxy, RPC, Metrics,
        Scheduler, SchedAllocation, SchedApplication, SchedAppUsage, 
SchedContext, SchedFSM, SchedHealth, SchedNode,
-       SchedPartition, SchedPreemption, SchedQueue, SchedReservation, 
SchedUGM, SchedNodesUsage, Security, Utils, Diagnostics, 
SchedQuotaChangePreemption,
+       SchedPartition, SchedPreemption, SchedQueue, SchedReservation, 
SchedUGM, SchedNodesUsage, Security, Utils,
+       Diagnostics, SchedQuotaChangePreemption, SchedRequiredNodePreemption,
 }
 
 // structure to hold all current logger configuration state
diff --git a/pkg/log/logger_test.go b/pkg/log/logger_test.go
index 344ae892..0145822f 100644
--- a/pkg/log/logger_test.go
+++ b/pkg/log/logger_test.go
@@ -39,7 +39,7 @@ func TestLoggerIDs(t *testing.T) {
        _ = Log(Test)
 
        // validate logger count
-       assert.Equal(t, 30, len(loggers), "wrong logger count")
+       assert.Equal(t, 31, len(loggers), "wrong logger count")
 
        // validate that all loggers are populated and have sequential ids
        for i := 0; i < len(loggers); i++ {


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

Reply via email to