← Back to Pull requests

OCPBUGS-146773: [release-5.0] handle unset email threading in AlertmanagerConfig conversion #431

Closed
unknown closed this pull request without merging on Nov 27, 2026 06:15 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 13:48 UTC
Author

Converting an AlertmanagerConfig between v1beta1 and v1alpha1 panicked when an email receiver didn't set threading, because the converters dereferenced the pointer without a nil check. Since threading is optional, the conversion webhook failed for most email receivers.

Return nil when threading is unset, and add the first unit tests for the conversion functions.

Part of #8841

(cherry picked from commit aa7c138689ef3617981e9c3f88fdf1c4c2d1c27f)

Description

_Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request._

<!-- If it fixes an existing issue (bug or feature), use the following keyword -->

Closes: #ISSUE-NUMBER

If you're contributing for the first-time, check our [contribution guidelines](../CONTRIBUTING.md).

Type of change

_What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply._

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)

  • FEATURE (non-breaking change which adds functionality)

  • BUGFIX (non-breaking change which fixes an issue)

  • ENHANCEMENT (non-breaking change which improves existing functionality)

  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)
  • Verification


    <!-- How you tested it? How do you know it works? -->
    Please check the [Prometheus-Operator testing guidelines](../TESTING.md) for recommendations about automated tests.

    Changelog entry

    _Please put a one-line changelog entry below. This will be copied to the changelog file during the release process._

    <!--
    Your release note should be written in clear and straightforward sentences. Most often, users aren't familiar with
    the technical details of your PR, so consider what they need to know when you write your release note.

    Some brief examples of release notes:

  • Add metadataConfig field to the Prometheus CRD for configuring how remote-write sends metadata information.

  • Generate correct scraping configuration for Probes with empty or unset module parameter.

  • -->

    ``release-note

    ``

    Diff: 267 lines (+200 / -67) across 3 files Reviewer: simonpasquier Review duration: 3866m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 267 lines diff across 3 files
    0.63
    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%
    60%
    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.334
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #431"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 62.5% (MEDIUM) · Higher = larger blast radius
    62.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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 24.7% · Safe to merge
    24.7%