← Back to Pull requests

fix(mongodb-store): rename the init Job when its pod template changes #2381

Closed
unknown closed this pull request without merging on Nov 20, 2026 13:29 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 15:32 UTC
Author

Summary

A Job's spec.template is immutable, but the create-mongodb-database Job name hashed only the init inputs. Changing mongodb.nodeSelector, tolerations, images or imagePullSecrets kept the old name, so helm upgrade and the Argo CD server-side diff failed with an immutable-field error.

Move the pod template into a named template and hash its rendered output together with oplogSizeMB. Existing installs get a new Job name once, so the init Job runs one more time. Every init step is idempotent.

Aligned all the mentions of the old scriptHash to plain hash in docs and templates.

Fixes #2378

Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing


  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • Checklist


  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    MongoDB initialization Jobs are recreated when the oplog size, oplog shrink setting, or relevant pod configuration changes. Unrelated resource-limit changes do not change the Job name.
    Job names account for rendered pod settings, including node selectors, tolerations, and image configuration.

    Documentation
    Updated MongoDB configuration guidance and runbooks to clarify Job naming and the changes that trigger a new initialization Job.
    Clarified that switching MongoDB backends does not migrate data and may leave services connected to an empty database. Added guidance on redeploying and using backup and restore to preserve health events.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 263 lines (+197 / -66) across 3 files Reviewer: KaivalyaMDabhadkar Review duration: 11396m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 263 lines diff across 3 files
    0.39
    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
    Real PR Conversation Timeline
    1 comments
    "Review active on #2381"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 39.3% (MEDIUM) · Higher = larger blast radius
    39.3%
    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: 15.5% · Safe to merge
    15.5%