[Bug] logStdoutEncoder and logFileEncoder setting from `--config` are ignored #5322
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.71) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.71 · 558 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.071
Real PR Conversation Timeline
1 comments
"Review active on #5322"
general
weight: 0.35
win5923
Why are these changes needed?
When
--configis used,logStdoutEncoderandlogFileEncoderare loaded intoconfig.LogStdoutEncoder/config.LogFileEncoder, butmain.gostill builtthe zap encoders from the raw flag variables. Since the flag defaults are always
"json", this silently overrode any encoder setting from the config file, eventhough the flag help text says "Flags are ignored if config file is set".
This PR switches the
newLogEncoder()calls to useconfig.LogStdoutEncoder/config.LogFileEncoderinstead.--config, behavior is unchanged: the flag values are copied intoconfigbefore this point, so both code paths read the same value.newLogEncoderalready treats an empty value as"json", matching the flagdefault, so a config file that omits the encoder fields still gets
"json".Related issue number
Closes #5309
Labels
doc-updates-requiredlabel.breaking-changelabel.Checks
- [x] Unit tests
- [x] Manual tests
- [ ] This PR is not tested :(
Manual test instructions
Validation performed with Go 1.26.0 from
ray-operator/:go build ./...make test— all packages passed. Full output below.'''
ok github.com/ray-project/kuberay/ray-operator (cached) coverage: 5.3% of statements
ok github.com/ray-project/kuberay/ray-operator/apis/config/v1alpha1 (cached) coverage: 14.2% of statements
github.com/ray-project/kuberay/ray-operator/apis/ray/v1 coverage: 0.0% of statements
github.com/ray-project/kuberay/ray-operator/apis/ray/v1alpha1 coverage: 0.0% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray 440.623s coverage: 72.2% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler (cached) coverage: 48.1% of statements
github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/interface coverage: 0.0% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/kai-scheduler (cached) coverage: 61.9% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/kubernetes-was (cached) coverage: 53.8% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/kubernetes-was/v1alpha3(cached) coverage: 78.7% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/scheduler-plugins (cached) coverage: 35.3% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/utils (cached) coverage: 100.0% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/volcano (cached) coverage: 76.1% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/yunikorn (cached) coverage: 84.8% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/common 1.180s coverage: 89.3% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/expectations (cached) coverage: 80.6% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/metrics (cached) coverage: 84.9% of statements
github.com/ray-project/kuberay/ray-operator/controllers/ray/metrics/mocks coverage: 0.0% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/utils (cached) coverage: 75.0% of statements
ok github.com/ray-project/kuberay/ray-operator/controllers/ray/utils/dashboardclient (cached) coverage: 45.9% of statements
? github.com/ray-project/kuberay/ray-operator/controllers/ray/utils/types [no test files]
ok github.com/ray-project/kuberay/ray-operator/internal/managercache (cached) coverage: 30.8% of statements
ok github.com/ray-project/kuberay/ray-operator/pkg/webhooks/v1 9.398s coverage: 72.7% of statements
'''
The full e2e test suite was not run locally.