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

karellen / kubernator / 24580658204
82%

Build:
DEFAULT BRANCH: master
Ran 17 Apr 2026 07:45PM UTC
Jobs 5
Files 24
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

17 Apr 2026 06:29PM UTC coverage: 77.939% (+1.0%) from 76.951%
24580658204

push

github

web-flow
Refactor k8s apply: SSA test-ops, 409 retry, watch-based delete, imperative API (#102)

## Summary

- Harden the K8s apply path with SSA-derived JSON-patch `test` ops for
`/metadata/uid` and `/metadata/resourceVersion`, and wrap the SSA patch
branch in a 409-retry loop that recomputes the patch on conflict.
- Extend `K8SResource` with `list()`, `watch()`, `delete(wait=True)`
that uses watch + `get()` recheck, and add a `resource_generator()`
extension seam on `KubernetesPlugin`.
- Add `ktor.k8s.resource(manifest)` — a fully-wired `K8SResource`
factory for imperative CRUD from `.kubernator.py` scripts, bypassing the
declarative apply lifecycle.
- Thread the applied manifest as a 4th return from `_apply_resource` and
its inner patch/create/delete callables for external consumers.
- Move dump-file open/close from `app.py` into
`KubernetesPlugin.handle_apply`; fix dump-mode `patch_func` to seed
uid/RV on a copy of the local manifest by extracting them from the
patch's own test ops (via `jsonpointer`), so the simulated post-patch
manifest can be returned honestly.
- Rewrite `delete_create` and `resource_version_merge` integration tests
as single-phase using the new imperative API, replacing `kubectl`-based
phase-1 setup and the `TEST_PHASE` env re-invocation.
- Add unit test for 409 retry and integration tests for `watch()` and
`resource_generator`. Port `resource_version_merge` from minikube to
kind.

## Test plan

- [x] `pyb -vX run_unit_tests` (32 tests, all green — includes new
`k8s_apply_retry_tests`)
- [x] `pyb -vX run_integration_tests -P
integrationtest_file_glob=delete_create_tests.py` (single-phase, kind,
immutable-field delete+recreate path)
- [x] `pyb -vX run_integration_tests -P
integrationtest_file_glob=resource_version_merge_tests.py`
(single-phase, kind, dump mode patch verification)
- [ ] Full `pyb -vX run_integration_tests` suite via CI across the
Python 3.10–3.14 matrix

614 of 976 branches covered (62.91%)

Branch coverage included in aggregate %.

137 of 163 new or added lines in 4 files covered. (84.05%)

5 existing lines in 3 files now uncovered.

3039 of 3711 relevant lines covered (81.89%)

4.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
81.02
6.7% src/main/python/kubernator/plugins/k8s.py
8
80.66
0.79% src/main/python/kubernator/plugins/k8s_api.py
4
88.84
1.39% src/main/python/kubernator/plugins/istio.py
1
85.98
-0.32% src/main/python/kubernator/app.py

Coverage Regressions

Lines Coverage ∆ File
3
71.93
-0.13% src/main/python/kubernator/api.py
1
88.84
1.39% src/main/python/kubernator/plugins/istio.py
1
81.02
6.7% src/main/python/kubernator/plugins/k8s.py
Jobs
ID Job ID Ran Files Coverage
1 24580658204.1 17 Apr 2026 07:45PM UTC 24
77.77
GitHub Action Run
2 24580658204.2 17 Apr 2026 07:45PM UTC 24
77.75
GitHub Action Run
3 24580658204.3 17 Apr 2026 07:46PM UTC 24
77.75
GitHub Action Run
4 24580658204.4 17 Apr 2026 07:50PM UTC 24
77.75
GitHub Action Run
5 24580658204.5 17 Apr 2026 09:39PM UTC 24
77.75
GitHub Action Run
Source Files on build 24580658204
  • Tree
  • List 24
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • ab4ca725 on github
  • Prev Build on master (#24375642090)
  • Next Build on master (#24621395421)
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