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

operator-framework / operator-sdk / 9578
31%

Build:
DEFAULT BRANCH: master
Ran 07 Apr 2020 11:33AM UTC
Jobs 1
Files 82
Run time 10s
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

07 Apr 2020 11:17AM UTC coverage: 42.943% (-2.1%) from 45.023%
9578

push

travis-ci

web-flow
Fix issue faced in the reconciliation when arrays are used in the config YAML files for Helm based-operators. 

** Changes performed **

* Upgrade the `github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a` to `gomodules.xyz/jsonpatch/v3 v3.0.1`. 
* The update on this JSON path library was done to fix an issue during reconciliation of arrays. 
* Added unit test to check the change made
* Added small fx in the if to ensure that fields managed by the Helm chart with the operation as add but empty values are not returned and used in the patch. 

** Full description **

The old version had an incomplete implementation for json patches of arrays.
A diff between
```
containers:
    - name: container1
    - name: container2
```
and
```
containers:
    - name: container1
```

created 3 patch operations:
- remove containers/0
- remove containers/1
- add containers/0

This causes an issue because we are ignoring all "remove" operations to allow manual modifications.

Helm tries to apply
```
containers:
    - name: container1
    - name: container2
    - name: container1
```

```
invalid: spec.template.spec.containers[0].name: Duplicate value:
"container1"
```

The new jsonpatch version does only return a `remove containers/1`
operation (which we are still ignoring because it could be a manual
change, but does not fail)

2915 of 6788 relevant lines covered (42.94%)

4.47 hits per line

Jobs
ID Job ID Ran Files Coverage
5 9578.5 (PATH=/opt/python/3.6.7/bin:$PATH CLUSTER=k8s) 07 Apr 2020 11:33AM UTC 0
42.94
Travis Job 9578.5
Source Files on build 9578
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #9578
  • b88da527 on github
  • Prev Build on master (#9572)
  • Next Build on master (#9582)
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