← Back to Pull requests

[Bug] logStdoutEncoder and logFileEncoder setting from `--config` are ignored #5322

Closed
unknown closed this pull request without merging on Sep 22, 2026 21:49 UTC
View on GitHub
unknown unknown commented on Sep 19, 2026 14:10 UTC
Author

Why are these changes needed?

When --config is used, logStdoutEncoder and logFileEncoder are loaded into
config.LogStdoutEncoder / config.LogFileEncoder, but main.go still built
the zap encoders from the raw flag variables. Since the flag defaults are always
"json", this silently overrode any encoder setting from the config file, even
though the flag help text says "Flags are ignored if config file is set".

This PR switches the newLogEncoder() calls to use config.LogStdoutEncoder /
config.LogFileEncoder instead.

  • Without --config, behavior is unchanged: the flag values are copied into

  • config before this point, so both code paths read the same value.
  • newLogEncoder already treats an empty value as "json", matching the flag

  • default, so a config file that omits the encoder fields still gets "json".

    Related issue number

    Closes #5309

    Labels

  • If this PR has user-facing changes that require documentation updates at release time, I have added the doc-updates-required label.

  • If this PR contains breaking changes, I have added the breaking-change label.
  • Checks

  • I've made sure the tests are passing.

  • Testing Strategy

  • - [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.

    Diff: 558 lines (+418 / -140) across 6 files Reviewer: win5923 Review duration: 4779m
    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
    0.71
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    57%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 71.4% (HIGH) · Higher = larger blast radius
    71.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 58.0% · Lower = rushed or shallow review
    58.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.0% · Safe to merge
    30.0%