You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your ScaledJob manifest uses the runnerScopeFromEnv parameter and the value is not found at runtime, either because the variable is missing or is incorrectly named, the parseGitHubRunnerMetadata method will return a null which will later be referenced which triggers a nil reference exception. This causes a panic which puts the keda operator pod in a crash loop.
Expected Behavior
If an invalid value is provided to this parameter, that value should be evaluated and if missing or invalid it should log an informative error and cleanly exit the process.
Actual Behavior
When an invalid or blank value is provided to the runnerScopeFromEnv metadata value in the ScaledJob manifest, the parseGitHubRunnerMetadata returns a null for the 'meta' object. In a subsequent line of code the values of meta.applicationID, meta.installationID and meta.applicationkey are evaluated. That check against a null meta object triggers a null reference exception. This exception puts the keda operator in a crash loop.
Steps to Reproduce the Problem
Create Kubernetes cluster (tested on version 1.29)
Install keda via helm
Create a manifest like the following, filling in redacted data
Report
If your ScaledJob manifest uses the runnerScopeFromEnv parameter and the value is not found at runtime, either because the variable is missing or is incorrectly named, the parseGitHubRunnerMetadata method will return a null which will later be referenced which triggers a nil reference exception. This causes a panic which puts the keda operator pod in a crash loop.
Expected Behavior
If an invalid value is provided to this parameter, that value should be evaluated and if missing or invalid it should log an informative error and cleanly exit the process.
Actual Behavior
When an invalid or blank value is provided to the runnerScopeFromEnv metadata value in the ScaledJob manifest, the parseGitHubRunnerMetadata returns a null for the 'meta' object. In a subsequent line of code the values of meta.applicationID, meta.installationID and meta.applicationkey are evaluated. That check against a null meta object triggers a null reference exception. This exception puts the keda operator in a crash loop.
Steps to Reproduce the Problem
You should see the logs show the nil reference excption and the keda operator pod enter a crash loop.
Logs from KEDA operator
KEDA Version
2.15.1
Kubernetes Version
1.29
Platform
Microsoft Azure
Scaler Details
Github Runner Scaler
Anything else?
Lines of code reference.
getValueFromMetaOrEnv returns null:
keda/pkg/scalers/github_runner_scaler.go
Line 388 in f6358d5
Calls the parse and gets back a null 'meta' object
keda/pkg/scalers/github_runner_scaler.go
Line 337 in f6358d5
Checks the values in a null 'meta' object which triggers nil reference exception
keda/pkg/scalers/github_runner_scaler.go
Line 342 in f6358d5
The text was updated successfully, but these errors were encountered: