Repo: /Users/dsrinivas/go/src/k8s.io/k8s-pr-136826 Branch: bumpv0.32 Commit(s) or range: master..f59cfe60ef2063e2383ebef416f9da05196903d6 PR: kubernetes/kubernetes#136826
This PR bumps sigs.k8s.io/structured-merge-diff/v6 from v6.3.1 to v6.3.2 across root and staging go.mod/go.sum and refreshes vendored code. The only functional change is a guard in value/reflectcache.go that returns a zero value instead of dereferencing a nil embedded pointer in a field path, preventing a potential nil pointer deref during structured-merge-diff reflection. Vendor/go.mod/go.sum changes are consistent; no policy files were touched.
| Dependency | Type | Old | New | Notes |
|---|---|---|---|---|
| sigs.k8s.io/structured-merge-diff/v6 | version bump | v6.3.1 | v6.3.2 | Patch update; no module split/rename |
Minimum Go version: no change observed. Retracted versions: none noted between v6.3.1 and v6.3.2 (no retraction metadata found).
- Releases/changelog: no GitHub “releases” entry for v6.3.2; only lightweight tag exists.
- GitHub compare v6.3.1..v6.3.2 shows 2 commits, with a single functional change:
fix: handle nil values in fieldf field path and update tests(PR #309). Adds a nil check inFieldCacheEntry.GetFromto returnreflect.Zeroif an embedded pointer in the field path is nil. Adds a test case for embedded nil structs.
- Vendored diff only touches
value/reflectcache.gowith internal logic; no exported symbols added/removed. - No signatures changed; no new packages; no module structure changes.
- No compatibility shims required.
- Structured-merge-diff reflection no longer panics when traversing an embedded pointer that is nil; it now returns the zero value for the field type.
- Affects structured-merge-diff field extraction and typed reflection pathways (used by managed fields / server-side apply). Impact is strictly improved robustness; behavior changes from “panic” to “zero value” for nil embedded pointer paths.
- Kubernetes uses structured-merge-diff extensively in apimachinery managed fields, fieldpath operations, and server-side apply.
- The change is internal to structured-merge-diff and does not require code updates in Kubernetes.
- The new behavior prevents potential crashes when objects include embedded pointer structs that are nil; no evidence of code relying on panic behavior.
- No generated output changes expected; no codegen or schema generation logic altered in this bump.
| Risk | Description | Likelihood | Severity | Affected code |
|---|---|---|---|---|
| Compile-time breakage | API or signature changes | Low | Low | None detected |
| Runtime behavior change | Nil embedded pointer now yields zero value instead of panic | Low | Low | Managed fields / SSA reflection paths |
| Performance regressions | Extra nil check in field path traversal | Low | Low | structured-merge-diff value reflection |
| Downstream impact | Any consumer of structured-merge-diff | Low | Low | Downstream users of v6 |
| Toolchain mismatch | Go version changes | Low | Low | None |
Safe to merge. This is a small patch-level update with a single defensive nil check and test addition. It reduces the chance of a nil pointer deref in structured-merge-diff reflection without changing public APIs. The Kubernetes codebase consumes the library broadly for managed fields/server-side apply, and this change only improves robustness in edge cases.