← Back to Pull requests

Log a warning when remote-deployments-poll-interval gets clamped #2354

Open
magic-peach opened this pull request with 38 lines diff across 4 files
View on GitHub
magic-peach magic-peach commented on Sep 16, 2026 02:29 UTC
Author

This repo has no PR template, so this is a plain factual description.

What changed: added RemoteDeploymentsPollIntervalWasClamped in pkg/reconciler/common/poll_interval_flag.go, and a conditional logger.Warnf call in both pkg/reconciler/knativeserving/controller.go and pkg/reconciler/knativeeventing/controller.go, right next to the existing startup log line that reports the resolved poll interval.

Why: the flag help text and the README's CLI flags table both document that a remote-deployments-poll-interval value below 1s falls back to the default with a warning log entry. The code only clamped the value silently, so a misconfigured flag gave no signal at all. Confirmed via git log that this was an oversight in the PR that introduced the flag (#2267), not something already tracked.

How tested: go build ./... and go test on pkg/reconciler/common, pkg/reconciler/knativeserving, and pkg/reconciler/knativeeventing, all green, including 9 new and existing cases for the poll interval helpers. Rebuilt and retested against the current tip of main immediately before opening this PR.

Confirmed no existing issue or PR covers this (searched by flag name and by keyword).

Diff: 38 lines (+38 / -0) across 4 files Reviewer: dsimansk Review duration: 112153m
All Vouch review confidence checks passed
Residual risk 0.09 = Change Risk (0.59) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 38 lines diff across 4 files
0.59
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.91 · 5 substantive comment(s)
0.91
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
84%
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.219
Sensitive Paths sensitive_paths
0.059
Real PR Conversation Timeline
8 items
knative-prow[bot] knative-prow[bot] commented on Sep 16, 2026 02:29 UTC
Bot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: <a href="https://github.com/knative/operator/pull/2354#" title="Author self-approved">magic-peach</a>
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

<details open>
Needs approval from an approver in each of these files:

  • OWNERS
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":["dprotaso"]} -->

    knative-prow[bot] knative-prow[bot] commented on Sep 16, 2026 02:29 UTC
    Bot

    Welcome @magic-peach! It looks like this is your first PR to knative/operator 🎉

    knative-prow[bot] knative-prow[bot] commented on Sep 16, 2026 02:29 UTC
    Bot

    Hi @magic-peach. Thanks for your PR.

    I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

    Regular contributors should join the org to skip this step.

    Once the patch is verified, the new status will be reflected by the ok-to-test label.

    I understand the commands that are listed here.

    <details>

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
    </details>

    kahirokunn kahirokunn commented on Sep 16, 2026 05:50 UTC
    Contributor

    /ok-to-test

    kahirokunn kahirokunn commented on Sep 16, 2026 05:51 UTC
    Contributor

    /lgtm
    Thank you 🙏

    dsimansk dsimansk commented on code on Sep 17, 2026 15:07 UTC
    Code Review
    pkg/reconciler/common/poll_interval_flag.go:1
    @@ -40,3 +40,9 @@ func RemoteDeploymentsPollIntervalValue() time.Duration {
     	}
     	return remoteDeploymentsPollIntervalFlag
     }

    I'd rather see bool returned from this function, as it states clamping is happening. Then act accordingly to log warning.

    codecov[bot] codecov[bot] commented on Sep 17, 2026 15:08 UTC
    Bot

    Codecov Report


    :x: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
    :white_check_mark: Project coverage is 65.88%. Comparing base (074eebe) to head (e9b3431).
    :warning: Report is 1 commits behind head on main.

    | Files with missing lines | Patch % | Lines |
    |---|---|---|
    | pkg/reconciler/knativeeventing/controller.go | 0.00% | 2 Missing :warning: |
    | pkg/reconciler/knativeserving/controller.go | 0.00% | 2 Missing :warning: |

    <details><summary>Additional details and impacted files</summary>

    @@            Coverage Diff             @@
    ##             main    #2354      +/-   ##
    ==========================================
    - Coverage   65.95%   65.88%   -0.08%     
    ==========================================
      Files          56       56              
      Lines        2682     2688       +6     
    ==========================================
    + Hits         1769     1771       +2     
    - Misses        777      781       +4     
      Partials      136      136              
    

    </details>

    :umbrella: View full report in Codecov by Harness.
    :loudspeaker: Have feedback on the report? Share it here.
    <details><summary> :rocket: New features to boost your workflow: </summary>

  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  • </details>

    Reviewers
    Assignees
    magic-peach magic-peach
    Labels
    risk: low confidence: 84.1% 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: 59.5% (MEDIUM) · Higher = larger blast radius
    59.5%
    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: 84.1% · Lower = rushed or shallow review
    84.1%
    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: 9.5% · Safe to merge
    9.5%