Skip to content

chore(k8s): bump patch versions for 1.14 - 1.31 - #393

Merged
Peefy merged 3 commits into
mainfrom
chore/bump-k8s-versions
Aug 24, 2026
Merged

chore(k8s): bump patch versions for 1.14 - 1.31#393
Peefy merged 3 commits into
mainfrom
chore/bump-k8s-versions

Conversation

@Peefy

@Peefy Peefy commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #392.

PR #392 rewrote 3308 schema files to fix the bare
apimachinery.pkg.apis.meta.v1 import bug, but the kcl.mod files
themselves were left at their old patch versions. Users who pin a
specific version (or who rely on kcl mod update against a registry
that still serves the old tags) would silently stay on the broken
package.

This PR bumps the patch digit on every k8s/<x.y>/kcl.mod whose
contents were changed by #392:

before after
1.14.1 1.14.2
1.15.1 1.15.2
... ...
1.28.1 1.28.2
1.29.1 1.29.2
1.30.1 1.30.2
1.31.2 1.31.3

(Full table of 18 versions in the commit message.)

k8s 1.32+ are untouched because they were never affected by the bug.

Test plan

  • go test ./... locally is still 67 PASS / 5 SKIP / 0 FAIL across
    the 20 versions covered by TestK8sPackages (the test reads
    kcl.mod only as a sanity check; the version bump itself is a
    pure metadata change).
  • wait for CI on this PR to confirm green.

claude and others added 3 commits August 24, 2026 14:37
KCL's auto-generated Kubernetes schema packages up to 1.31 imported the
`apimachinery.pkg.apis.meta.v1` module without an alias, which causes
schema resolution to fail whenever the parent package is imported via
`as <alias>` (the relative-import resolver cannot fall back to the
parent-package namespace).

Fix by adding `as metav1` to every such import and rewriting in-file
`v1.<TypeName>` references to `metav1.<TypeName>`. 1.32+ already uses
this pattern and is unaffected.

This unblocks downstream users on Windows / older k8s versions (e.g.
konfig nginx-example pinned to 1.31.2) and resolves the failure
reported in kcl-lang/kcl#2127.

Affected: 3308 files across k8s 1.14 -> 1.31.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claude <claude@anthropic.com>
Extend TestK8sPackages to exercise every k8s package version touched by
the bare `apimachinery.pkg.apis.meta.v1` import fix. The new
networkpolicy case instantiates a NetworkPolicy that depends on both
metav1.ObjectMeta (via `metadata`) and metav1.LabelSelector (via
`spec.podSelector.matchLabels`), so any future regression on the
`metav1` aliasing will surface as a compile or assertion failure.

Per-case required-schema gates skip the ingress test for k8s 1.14 -
1.18 because networking.k8s.io/v1 Ingress was only promoted out of
v1beta1 in 1.19.

Local `go test ./...` reports 67 PASS / 5 SKIP across 20 versions.

Signed-off-by: Claude <claude@anthropic.com>
PR #392 rewrote 3308 schema files to fix the bare
`apimachinery.pkg.apis.meta.v1` import bug, but the kcl.mod files
themselves were left at their old patch versions. Bump every affected
package by one patch so users who pin a version (or rely on
`kcl mod update`) actually pull the fix.

- 1.14.1 -> 1.14.2
- ...
- 1.28.1 -> 1.28.2
- 1.31.2 -> 1.31.3

1.32+ and 1.30.x unaffected paths are not touched.

Signed-off-by: Claude <claude@anthropic.com>
@Peefy
Peefy merged commit be1a56d into main Aug 24, 2026
7 checks passed
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.

2 participants