• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

splunk / splunk-operator / 24527069454
84%
main: 84%

Build:
Build:
LAST BUILD BRANCH: helm-chart-3.0.0-restore-develop
DEFAULT BRANCH: main
Ran 16 Apr 2026 06:34PM UTC
Jobs 1
Files 53
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Apr 2026 06:27PM UTC coverage: 84.044%. Remained the same
24527069454

Pull #1850

circleci

gabrielm-splunk
Fix CEL validation error when provider field is missing in VolumeSpec

## Problem
After upgrading to v3.1.0, customers encountered validation errors when
updating existing Standalone CRs that were created with previous versions:

```
The Standalone "standalone" is invalid: status.smartstore.volumes[0]:
Invalid value: "object": no such key: provider evaluating rule:
region is required when provider is aws
```

This error occurred because the CEL validation rule added in #1740
attempted to access `self.provider` without first checking if the field
exists. In upgrade scenarios, status fields populated by older operator
versions may not include the `provider` field, causing the validation
to fail with "no such key: provider".

## Root Cause
The original CEL validation rule was:
```
self.provider != 'aws' || size(self.region) > 0
```

This rule evaluates `self.provider` even when the field doesn't exist,
violating CEL's requirement to check field existence with `has()` before
accessing optional fields.

## Solution
Updated the CEL validation rule to:
```
!has(self.provider) || self.provider != 'aws' || (has(self.region) && size(self.region) > 0)
```

This change:
1. First checks if `provider` field exists with `!has(self.provider)`
2. If it doesn't exist, validation passes (allows backward compatibility)
3. Only validates the AWS region requirement when provider is explicitly set to 'aws'
4. Also checks `has(self.region)` before accessing the region field

## Testing
Reproduced the issue by:
1. Creating a Standalone CR with the v3.1.0 CRDs
2. Patching the status to remove the provider field (simulating upgrade scenario)
3. Confirmed the error: "no such key: provider evaluating rule"
4. Applied the fix and verified the same operation succeeds

## Impact
- Fixes upgrade path from pre-3.1.0 versions where status fields were
  populated without the provider field
- Maintains the validation requirement that AWS volumes must have a region
- No impact on new depl... (continued)
Pull Request #1850: Fix CEL validation error when provider field is missing in VolumeSpec

11930 of 14195 relevant lines covered (84.04%)

28.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24527069454.1 16 Apr 2026 06:34PM UTC 53
84.04
CircleCI Job
Source Files on build 24527069454
  • Tree
  • List 53
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #24527069454
  • Pull Request #1850
  • PR Base - develop (#24493383273)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc