Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG-5922] Report failing ScaledJob triggers in status #5916

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

josefkarasek
Copy link
Member

@josefkarasek josefkarasek commented Jun 27, 2024

When a trigger for scaledjob fails, do not hide the error from the user. Report it in the status and operator log.

Checklist

Fixes #5922

Signed-off-by: Josef Karasek <josef@kedify.io>
@josefkarasek josefkarasek changed the title Report failing ScaledJob triggers in status [BUG-5922] Report failing ScaledJob triggers in status Jun 28, 2024
@josefkarasek josefkarasek marked this pull request as ready for review June 28, 2024 08:00
@josefkarasek josefkarasek requested a review from a team as a code owner June 28, 2024 08:00
Signed-off-by: Josef Karasek <josef@kedify.io>
Signed-off-by: Josef Karasek <josef@kedify.io>
@@ -757,8 +759,9 @@ func TestIsScaledJobActiveIfQueueEmptyButMinReplicaCountGreaterZero(t *testing.T
scaledObjectsMetricCache: metricscache.NewMetricsCache(),
}

isActive, queueLength, maxValue := sh.isScaledJobActive(context.TODO(), scaledJobSingle)
isActive, isError, queueLength, maxValue := sh.isScaledJobActive(context.TODO(), scaledJobSingle)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to use well-defined context

Ignore this finding from context-todo.

@@ -717,9 +718,10 @@ func TestIsScaledJobActive(t *testing.T) {
scaledObjectsMetricCache: metricscache.NewMetricsCache(),
}
fmt.Printf("index: %d", index)
isActive, queueLength, maxValue = sh.isScaledJobActive(context.TODO(), scaledJob)
isActive, isError, queueLength, maxValue = sh.isScaledJobActive(context.TODO(), scaledJob)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to use well-defined context

Ignore this finding from context-todo.

@@ -661,19 +661,20 @@ func TestIsScaledJobActive(t *testing.T) {
scalerCachesLock: &sync.RWMutex{},
scaledObjectsMetricCache: metricscache.NewMetricsCache(),
}
isActive, queueLength, maxValue := sh.isScaledJobActive(context.TODO(), scaledJobSingle)
isActive, isError, queueLength, maxValue := sh.isScaledJobActive(context.TODO(), scaledJobSingle)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to use well-defined context

Ignore this finding from context-todo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScaledJob ignores failing trigger(s) error
1 participant