Skip to content

Conversation

@rlieberman-splunk
Copy link
Collaborator

Description

This PR includes 3 parts:

  1. Stabilizes integration test cases by re-fetching the StatefulSet at the beginning of UpdateStatefulSetPods: The problem is that UpdateStatefulSetPods uses the statefulSet object that was fetched earlier, but the StatefulSet controller may not have updated the Status.UpdateRevision yet. The StatefulSet's Spec gets updated, but the Status (specifically UpdateRevision) isn't updated immediately. If the operator's reconciliation loop runs before the StatefulSet controller updates the status, it incorrectly reports PhaseReady. This is causing MC pods to fail verification because they show as PhaseReady before recycling pods and going into PhaseError.
  2. Updates unit tests: With the above change, unit tests required updates to run successfully.
  3. Update golang.com/xcrypto dependency: This fixes a new security vulnerability that was identified.

Key Changes

  • pkg/splunk/splkcontroller/statefulset.go: re-fetch statefulset before continuing with updates
  • _test.go files: update unit test cases to account for re-fetching statefulsets
  • go.mod/go.sum: update dependencies with new xcrypto version v0.45.0

Testing and Verification

  • Unit tests pass
  • Smoke tests pass

Related Issues

PR Checklist

  • Code changes adhere to the project's coding standards.
  • Relevant unit and integration tests are included.
  • Documentation has been updated accordingly.
  • All tests pass locally.
  • The PR description follows the project's guidelines.

@coveralls
Copy link
Collaborator

coveralls commented Dec 2, 2025

Pull Request Test Coverage Report for Build 19873808841

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 1 file are covered.
  • 35 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 86.363%

Files with Coverage Reduction New Missed Lines %
pkg/splunk/enterprise/afwscheduler.go 1 92.72%
pkg/splunk/splkcontroller/statefulset.go 3 96.38%
pkg/splunk/enterprise/clustermanager.go 31 74.19%
Totals Coverage Status
Change from base Build 19833240919: -0.1%
Covered Lines: 10728
Relevant Lines: 12422

💛 - Coveralls

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 19865594444

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 86.496%

Files with Coverage Reduction New Missed Lines %
pkg/splunk/enterprise/afwscheduler.go 1 92.72%
pkg/splunk/splkcontroller/statefulset.go 3 96.38%
Totals Coverage Status
Change from base Build 19833240919: -0.02%
Covered Lines: 10742
Relevant Lines: 12419

💛 - Coveralls

@rlieberman-splunk rlieberman-splunk merged commit a6db608 into develop Dec 3, 2025
59 of 65 checks passed
@rlieberman-splunk rlieberman-splunk deleted the CSPL_4239_mc_error branch December 3, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants