Bump k8s.io/apimachinery from 0.34.1 to 0.35.2#62
Bump k8s.io/apimachinery from 0.34.1 to 0.35.2#62dependabot[bot] wants to merge 1 commit intomainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dependabot[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
WalkthroughUpdated Go toolchain to 1.25.0 and bumped k8s.io/apimachinery to v0.35.2; added OpenAPI model-name helpers and annotations, introduced many new validation helpers/format validators and generic update/limit validators, refactored protobuf serializers to internal interfaces, and added kube-openapi naming utilities and a Trie implementation. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
vendor/modules.txt (1)
354-355: Verifyk8s.io/*minor-version skew is intentional.
k8s.io/apimachineryis at v0.35.2 whilek8s.io/apiandk8s.io/client-goremain at v0.34.1. This 1-minor-version skew is present in bothgo.modandvendor/modules.txtwith no explanatory comments. The codebase actively uses both apimachinery utilities (wait, errors, sets) and client-go configuration together, and there is no CI validation or documentation confirming that this cross-version pairing is supported. Either align to a consistent minor version or add explicit documentation and test coverage validating the compatibility.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@vendor/modules.txt` around lines 354 - 355, The module version skew between k8s.io/apimachinery (v0.35.2) and k8s.io/api + k8s.io/client-go (v0.34.1) must be resolved: either align the minor versions in go.mod and vendor/modules.txt (e.g., set apimachinery to v0.34.x or bump api and client-go to v0.35.x) and run go mod tidy + vendor refresh, or add a clear comment in go.mod/vendor/modules.txt and a small CI/test that exercises combined usage of apimachinery utilities (wait, errors, sets) with client-go configuration to validate compatibility; search for references to k8s.io/apimachinery, k8s.io/api, and k8s.io/client-go to update version strings and ensure build/tests pass before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@go.mod`:
- Around line 21-22: Update the Kubernetes client library versions in go.mod so
they match apimachinery v0.35.2: change k8s.io/client-go to v0.35.2 and bump
k8s.io/api to v0.35.2 (they currently differ: client-go v0.34.1 and api v0.34.1
while apimachinery is v0.35.2); after editing the k8s.io/client-go and
k8s.io/api module lines, run go get or go mod tidy (e.g., go get
k8s.io/client-go@v0.35.2 k8s.io/api@v0.35.2) to update the lockfile and ensure
all Kubernetes client modules are aligned.
- Line 3: Update the Go toolchain version in the go.mod file by changing the go
directive from "go 1.25.0" to "go 1.26.0" (i.e., replace the existing go
directive token), then run module maintenance and verification (e.g., go mod
tidy and the test suite/CI) to ensure no compatibility issues; if any
deprecated/changed APIs surface, fix usages accordingly.
In `@vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go`:
- Around line 205-209: The current check uses strings.Contains(val,
resourceDefaultNamespacePrefix) which can falsely reject values that merely
contain the substring; change that conditional to test for prefix ownership
instead (e.g., use strings.HasPrefix on val with resourceDefaultNamespacePrefix)
so only values that actually begin with the reserved domain prefix are rejected,
keeping the existing field.Invalid(fldPath, val, fmt.Sprintf(...)) behavior and
message.
- Around line 236-257: The switch in resourcesQualifiedName that inspects parts
:= strings.Split(s, "/") currently handles case 1 and 2 but lacks a default
branch, so inputs containing more than one '/' (e.g. "a/b/c") silently pass; add
a default branch in the switch to append a validation error (using field.Invalid
on fldPath with a clear message like "invalid format: too many '/' separators"
or "qualified name must contain at most one '/'") so such values are rejected;
reference the parts variable and the resourcesQualifiedName function when making
the change.
In `@vendor/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.go`:
- Line 209: Fix the documentation typo in the comment that currently reads
"expception" by replacing it with "exception" (search for the comment containing
the phrase "expception to this is when it finds two errors which are exactly
identical" in error_matcher.go and update the misspelled word).
In `@vendor/k8s.io/kube-openapi/pkg/util/trie.go`:
- Line 56: Fix the minor doc typo in the comment for the HasPrefix method in
trie.go: change "returns true of v" to "returns true if v" in the comment above
HasPrefix so the documentation reads correctly.
In `@vendor/k8s.io/kube-openapi/pkg/util/util.go`:
- Line 73: Fix the typo in the package comment where "uniquely indentifying"
appears—replace "indentifying" with "identifying" so the sentence reads "for
uniquely identifying"; locate the comment near the OpenAPI canonical names
description (the line referencing "OpenAPI canonical names are Go type names
with full package path, for uniquely indentifying") and update the word only.
---
Nitpick comments:
In `@vendor/modules.txt`:
- Around line 354-355: The module version skew between k8s.io/apimachinery
(v0.35.2) and k8s.io/api + k8s.io/client-go (v0.34.1) must be resolved: either
align the minor versions in go.mod and vendor/modules.txt (e.g., set
apimachinery to v0.34.x or bump api and client-go to v0.35.x) and run go mod
tidy + vendor refresh, or add a clear comment in go.mod/vendor/modules.txt and a
small CI/test that exercises combined usage of apimachinery utilities (wait,
errors, sets) with client-go configuration to validate compatibility; search for
references to k8s.io/apimachinery, k8s.io/api, and k8s.io/client-go to update
version strings and ensure build/tests pass before merging.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
⛔ Files ignored due to path filters (11)
go.sumis excluded by!**/*.sumvendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/api/resource/generated.protomessage.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.protomessage.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/runtime/generated.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/runtime/generated.protomessage.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/runtime/schema/generated.protomessage.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.gois excluded by!**/*.pb.govendor/k8s.io/apimachinery/pkg/util/intstr/generated.protomessage.pb.gois excluded by!**/*.pb.go
📒 Files selected for processing (49)
go.modvendor/k8s.io/apimachinery/pkg/api/errors/errors.govendor/k8s.io/apimachinery/pkg/api/resource/generated.protovendor/k8s.io/apimachinery/pkg/api/resource/quantity.govendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.govendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.model_name.govendor/k8s.io/apimachinery/pkg/api/validate/content/decimal_int.govendor/k8s.io/apimachinery/pkg/api/validate/content/dns.govendor/k8s.io/apimachinery/pkg/api/validate/content/errors.govendor/k8s.io/apimachinery/pkg/api/validate/content/identifier.govendor/k8s.io/apimachinery/pkg/api/validate/content/kube.govendor/k8s.io/apimachinery/pkg/api/validate/each.govendor/k8s.io/apimachinery/pkg/api/validate/enum.govendor/k8s.io/apimachinery/pkg/api/validate/immutable.govendor/k8s.io/apimachinery/pkg/api/validate/item.govendor/k8s.io/apimachinery/pkg/api/validate/limits.govendor/k8s.io/apimachinery/pkg/api/validate/options.govendor/k8s.io/apimachinery/pkg/api/validate/strfmt.govendor/k8s.io/apimachinery/pkg/api/validate/subfield.govendor/k8s.io/apimachinery/pkg/api/validate/union.govendor/k8s.io/apimachinery/pkg/api/validate/update.govendor/k8s.io/apimachinery/pkg/api/validate/zeroorone.govendor/k8s.io/apimachinery/pkg/api/validation/generic.govendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.govendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.govendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.protovendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.govendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.govendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.model_name.govendor/k8s.io/apimachinery/pkg/labels/selector.govendor/k8s.io/apimachinery/pkg/runtime/doc.govendor/k8s.io/apimachinery/pkg/runtime/scheme.govendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/collections.govendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.govendor/k8s.io/apimachinery/pkg/runtime/types_proto.govendor/k8s.io/apimachinery/pkg/runtime/zz_generated.model_name.govendor/k8s.io/apimachinery/pkg/util/intstr/generated.protovendor/k8s.io/apimachinery/pkg/util/intstr/intstr.govendor/k8s.io/apimachinery/pkg/util/intstr/zz_generated.model_name.govendor/k8s.io/apimachinery/pkg/util/sets/set.govendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.govendor/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.govendor/k8s.io/apimachinery/pkg/util/validation/field/errors.govendor/k8s.io/apimachinery/pkg/util/validation/validation.govendor/k8s.io/apimachinery/pkg/version/doc.govendor/k8s.io/apimachinery/pkg/version/zz_generated.model_name.govendor/k8s.io/kube-openapi/pkg/util/trie.govendor/k8s.io/kube-openapi/pkg/util/util.govendor/modules.txt
💤 Files with no reviewable changes (2)
- vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go
- vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
| go 1.24.0 | ||
|
|
||
| toolchain go1.24.4 | ||
| go 1.25.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
latest stable Go version February 2026
💡 Result:
As of February 2026, the latest stable Go release is Go 1.26.0, released 2026-02-10. [1], [2]
Sources: [1] go.dev downloads page (stable versions) • [2] Go official release history (go1.26.0 release date)
Consider updating to Go 1.26.0, the latest stable version.
Go 1.25.0 is available, but Go 1.26.0 was released on February 10, 2026 and is now the latest stable version. Review the release notes and evaluate whether upgrading is appropriate for your CI/CD pipelines and deployment targets.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@go.mod` at line 3, Update the Go toolchain version in the go.mod file by
changing the go directive from "go 1.25.0" to "go 1.26.0" (i.e., replace the
existing go directive token), then run module maintenance and verification
(e.g., go mod tidy and the test suite/CI) to ensure no compatibility issues; if
any deprecated/changed APIs surface, fix usages accordingly.
| k8s.io/apimachinery v0.35.2 | ||
| k8s.io/client-go v0.34.1 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n go.mod | head -30Repository: openshift-eng/ship-status-dash
Length of output: 1251
🏁 Script executed:
# Search for k8s.io dependencies
rg "k8s.io/(client-go|apimachinery|api)" go.modRepository: openshift-eng/ship-status-dash
Length of output: 160
🌐 Web query:
k8s.io/client-go v0.34.1 k8s.io/apimachinery v0.35.2 compatibility
💡 Result:
k8s.io/client-go v0.34.1 and k8s.io/apimachinery v0.35.2 are not considered compatible to mix.
- Kubernetes staging libraries use aligned versioning:
v0.x.ytags correspond to Kubernetesv1.x.yreleases (soclient-go v0.34.1↔ Kubernetesv1.34.1, whileapimachinery v0.35.2↔ Kubernetesv1.35.2). Mixing minors (0.34 vs 0.35) is outside the intended matching scheme. [1] client-goexpects its companion libraries (notablyk8s.io/apimachineryandk8s.io/api) to be vendored / selected in correspondingly matching versions for correct operation. [2]apimachineryexplicitly states it provides no compatibility guarantees and tracks Kubernetes. [3]
What to do:
- Prefer matching versions: upgrade
client-gotov0.35.2, or downgradeapimachinerytov0.34.1(and typically keepk8s.io/apialigned to the samev0.34.1/v0.35.2as well). [1][2]
Sources:
[1] Kubernetes client-go repo README (version tags mapping) (github.com)
[2] Kubernetes blog: client-go requires matching companion libs (kubernetes.io)
[3] apimachinery compatibility statement (chromium.googlesource.com)
Citations:
- 1: https://github.com/kubernetes/client-go?utm_source=openai
- 2: https://kubernetes.io/blog/2018/01/introducing-client-go-version-6/?utm_source=openai
- 3: https://chromium.googlesource.com/external/github.com/kubernetes/apimachinery/%2B/refs/tags/upstream/v0.35.2?utm_source=openai
Update k8s.io/client-go and k8s.io/api to v0.35.2 to match k8s.io/apimachinery.
k8s.io/apimachinery v0.35.2 and k8s.io/client-go v0.34.1 use mismatched minor versions. Kubernetes client libraries use aligned versioning where v0.x.y corresponds to Kubernetes v1.x.y, and mixing minor versions (0.34 vs 0.35) is outside the supported matching scheme. The client-go library explicitly requires companion libraries (apimachinery and api) to be in matching versions for correct operation. Update k8s.io/client-go to v0.35.2 and also bump k8s.io/api (currently v0.34.1) to v0.35.2 to maintain consistency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@go.mod` around lines 21 - 22, Update the Kubernetes client library versions
in go.mod so they match apimachinery v0.35.2: change k8s.io/client-go to v0.35.2
and bump k8s.io/api to v0.35.2 (they currently differ: client-go v0.34.1 and api
v0.34.1 while apimachinery is v0.35.2); after editing the k8s.io/client-go and
k8s.io/api module lines, run go get or go mod tidy (e.g., go get
k8s.io/client-go@v0.35.2 k8s.io/api@v0.35.2) to update the lockfile and ensure
all Kubernetes client modules are aligned.
| if !strings.Contains(val, "/") { | ||
| allErrs = append(allErrs, field.Invalid(fldPath, val, "a name must be a domain-prefixed path, such as 'example.com/my-prop'")) | ||
| } else if strings.Contains(val, resourceDefaultNamespacePrefix) { | ||
| allErrs = append(allErrs, field.Invalid(fldPath, val, fmt.Sprintf("must not have %q domain", resourceDefaultNamespacePrefix))) | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check the file exists and examine lines 199-225 for context
if [ -f "vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go" ]; then
sed -n '199,225p' vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go
else
echo "File not found at expected location"
# Try to locate it
find . -name "strfmt.go" -type f 2>/dev/null
fiRepository: openshift-eng/ship-status-dash
Length of output: 1386
🏁 Script executed:
# Also search for the definition of resourceDefaultNamespacePrefix
rg "resourceDefaultNamespacePrefix\s*=" vendor/k8s.io/apimachinery/pkg/api/validate/Repository: openshift-eng/ship-status-dash
Length of output: 178
🏁 Script executed:
# Look at the function definition to understand context
rg -B 20 "strings.Contains\(val, resourceDefaultNamespacePrefix" vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go | head -40Repository: openshift-eng/ship-status-dash
Length of output: 1191
Use prefix matching for reserved-domain rejection.
Line 207 uses strings.Contains(val, resourceDefaultNamespacePrefix), which can falsely reject valid values. For example, a domain like mykubernetes.io/resource contains the substring kubernetes.io/ but does not actually use the reserved kubernetes.io domain. The validation should only reject values that start with the reserved domain prefix.
🐛 Proposed fix
- } else if strings.Contains(val, resourceDefaultNamespacePrefix) {
+ } else if strings.HasPrefix(val, resourceDefaultNamespacePrefix) {
allErrs = append(allErrs, field.Invalid(fldPath, val, fmt.Sprintf("must not have %q domain", resourceDefaultNamespacePrefix)))
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if !strings.Contains(val, "/") { | |
| allErrs = append(allErrs, field.Invalid(fldPath, val, "a name must be a domain-prefixed path, such as 'example.com/my-prop'")) | |
| } else if strings.Contains(val, resourceDefaultNamespacePrefix) { | |
| allErrs = append(allErrs, field.Invalid(fldPath, val, fmt.Sprintf("must not have %q domain", resourceDefaultNamespacePrefix))) | |
| } | |
| if !strings.Contains(val, "/") { | |
| allErrs = append(allErrs, field.Invalid(fldPath, val, "a name must be a domain-prefixed path, such as 'example.com/my-prop'")) | |
| } else if strings.HasPrefix(val, resourceDefaultNamespacePrefix) { | |
| allErrs = append(allErrs, field.Invalid(fldPath, val, fmt.Sprintf("must not have %q domain", resourceDefaultNamespacePrefix))) | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go` around lines 205 -
209, The current check uses strings.Contains(val,
resourceDefaultNamespacePrefix) which can falsely reject values that merely
contain the substring; change that conditional to test for prefix ownership
instead (e.g., use strings.HasPrefix on val with resourceDefaultNamespacePrefix)
so only values that actually begin with the reserved domain prefix are rejected,
keeping the existing field.Invalid(fldPath, val, fmt.Sprintf(...)) behavior and
message.
| parts := strings.Split(s, "/") | ||
| // TODO: This validation and the corresponding handwritten validation validateQualifiedName in | ||
| // pkg/apis/resource/validation/validation.go are not validating whether there are more than 1 | ||
| // slash. This should be fixed in both places. | ||
| switch len(parts) { | ||
| case 1: | ||
| allErrs = append(allErrs, validateCIdentifier(parts[0], resourceDeviceMaxLength, fldPath)...) | ||
| case 2: | ||
| if len(parts[0]) == 0 { | ||
| allErrs = append(allErrs, field.Invalid(fldPath, "", "prefix must not be empty")) | ||
| } else { | ||
| if len(parts[0]) > 63 { | ||
| allErrs = append(allErrs, field.TooLong(fldPath, parts[0], 63)) | ||
| } | ||
| allErrs = append(allErrs, LongName(ctx, op, fldPath, &parts[0], nil).PrefixDetail("prefix: ")...) | ||
| } | ||
| if len(parts[1]) == 0 { | ||
| allErrs = append(allErrs, field.Invalid(fldPath, "", "name must not be empty")) | ||
| } else { | ||
| allErrs = append(allErrs, validateCIdentifier(parts[1], resourceDeviceMaxLength, fldPath)...) | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go | sed -n '230,280p'Repository: openshift-eng/ship-status-dash
Length of output: 2542
Add default case to reject qualified resource names with more than one '/' separator.
The resourcesQualifiedName function at line 240 lacks a default branch, so inputs like a/b/c produce no validation error; downstream, ResourceFullyQualifiedName at line 275 only checks whether '/' exists, allowing these malformed values to pass. The TODO comment at lines 237-239 already flags this gap.
Proposed fix
switch len(parts) {
case 1:
allErrs = append(allErrs, validateCIdentifier(parts[0], resourceDeviceMaxLength, fldPath)...)
case 2:
if len(parts[0]) == 0 {
allErrs = append(allErrs, field.Invalid(fldPath, "", "prefix must not be empty"))
} else {
if len(parts[0]) > 63 {
allErrs = append(allErrs, field.TooLong(fldPath, parts[0], 63))
}
allErrs = append(allErrs, LongName(ctx, op, fldPath, &parts[0], nil).PrefixDetail("prefix: ")...)
}
if len(parts[1]) == 0 {
allErrs = append(allErrs, field.Invalid(fldPath, "", "name must not be empty"))
} else {
allErrs = append(allErrs, validateCIdentifier(parts[1], resourceDeviceMaxLength, fldPath)...)
}
+ default:
+ allErrs = append(allErrs, field.Invalid(fldPath, s, "must contain a single '/' separating prefix and name"))
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| parts := strings.Split(s, "/") | |
| // TODO: This validation and the corresponding handwritten validation validateQualifiedName in | |
| // pkg/apis/resource/validation/validation.go are not validating whether there are more than 1 | |
| // slash. This should be fixed in both places. | |
| switch len(parts) { | |
| case 1: | |
| allErrs = append(allErrs, validateCIdentifier(parts[0], resourceDeviceMaxLength, fldPath)...) | |
| case 2: | |
| if len(parts[0]) == 0 { | |
| allErrs = append(allErrs, field.Invalid(fldPath, "", "prefix must not be empty")) | |
| } else { | |
| if len(parts[0]) > 63 { | |
| allErrs = append(allErrs, field.TooLong(fldPath, parts[0], 63)) | |
| } | |
| allErrs = append(allErrs, LongName(ctx, op, fldPath, &parts[0], nil).PrefixDetail("prefix: ")...) | |
| } | |
| if len(parts[1]) == 0 { | |
| allErrs = append(allErrs, field.Invalid(fldPath, "", "name must not be empty")) | |
| } else { | |
| allErrs = append(allErrs, validateCIdentifier(parts[1], resourceDeviceMaxLength, fldPath)...) | |
| } | |
| } | |
| parts := strings.Split(s, "/") | |
| // TODO: This validation and the corresponding handwritten validation validateQualifiedName in | |
| // pkg/apis/resource/validation/validation.go are not validating whether there are more than 1 | |
| // slash. This should be fixed in both places. | |
| switch len(parts) { | |
| case 1: | |
| allErrs = append(allErrs, validateCIdentifier(parts[0], resourceDeviceMaxLength, fldPath)...) | |
| case 2: | |
| if len(parts[0]) == 0 { | |
| allErrs = append(allErrs, field.Invalid(fldPath, "", "prefix must not be empty")) | |
| } else { | |
| if len(parts[0]) > 63 { | |
| allErrs = append(allErrs, field.TooLong(fldPath, parts[0], 63)) | |
| } | |
| allErrs = append(allErrs, LongName(ctx, op, fldPath, &parts[0], nil).PrefixDetail("prefix: ")...) | |
| } | |
| if len(parts[1]) == 0 { | |
| allErrs = append(allErrs, field.Invalid(fldPath, "", "name must not be empty")) | |
| } else { | |
| allErrs = append(allErrs, validateCIdentifier(parts[1], resourceDeviceMaxLength, fldPath)...) | |
| } | |
| default: | |
| allErrs = append(allErrs, field.Invalid(fldPath, s, "must contain a single '/' separating prefix and name")) | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@vendor/k8s.io/apimachinery/pkg/api/validate/strfmt.go` around lines 236 -
257, The switch in resourcesQualifiedName that inspects parts :=
strings.Split(s, "/") currently handles case 1 and 2 but lacks a default branch,
so inputs containing more than one '/' (e.g. "a/b/c") silently pass; add a
default branch in the switch to append a validation error (using field.Invalid
on fldPath with a clear message like "invalid format: too many '/' separators"
or "qualified name must contain at most one '/'") so such values are rejected;
reference the parts variable and the resourcesQualifiedName function when making
the change.
| // ByOrigin returns a derived ErrorMatcher which also matches by the origin. | ||
| // When this is used and an origin is set in the error, the matcher will | ||
| // consider all expected errors with the same origin to be a match. The only | ||
| // expception to this is when it finds two errors which are exactly identical, |
There was a problem hiding this comment.
Minor documentation typo.
"expception" should be "exception".
📝 Suggested fix
-// only exception to this is when it finds two errors which are exactly identical,
+// only exception to this is when it finds two errors which are exactly identical,Note: The word "expception" on line 209 should be corrected to "exception".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@vendor/k8s.io/apimachinery/pkg/util/validation/field/error_matcher.go` at
line 209, Fix the documentation typo in the comment that currently reads
"expception" by replacing it with "exception" (search for the comment containing
the phrase "expception to this is when it finds two errors which are exactly
identical" in error_matcher.go and update the misspelled word).
| root.word = v | ||
| } | ||
|
|
||
| // HasPrefix returns true of v has any of the prefixes stored in this trie. |
There was a problem hiding this comment.
Minor documentation typo.
The comment says "returns true of v" but should be "returns true if v".
📝 Suggested fix
-// HasPrefix returns true of v has any of the prefixes stored in this trie.
+// HasPrefix returns true if v has any of the prefixes stored in this trie.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // HasPrefix returns true of v has any of the prefixes stored in this trie. | |
| // HasPrefix returns true if v has any of the prefixes stored in this trie. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@vendor/k8s.io/kube-openapi/pkg/util/trie.go` at line 56, Fix the minor doc
typo in the comment for the HasPrefix method in trie.go: change "returns true of
v" to "returns true if v" in the comment above HasPrefix so the documentation
reads correctly.
|
|
||
| // OpenAPICanonicalTypeNamer is an interface for models without Go type to seed model name. | ||
| // | ||
| // OpenAPI canonical names are Go type names with full package path, for uniquely indentifying |
There was a problem hiding this comment.
Minor documentation typo.
"indentifying" should be "identifying".
📝 Suggested fix
-// a model / Go type. If a Go type is vendored from another package, only the path after "/vendor/"
+// a model / Go type. If a Go type is vendored from another package, only the path after "/vendor/"Line 73: "uniquely indentifying" should be "uniquely identifying".
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // OpenAPI canonical names are Go type names with full package path, for uniquely indentifying | |
| // OpenAPI canonical names are Go type names with full package path, for uniquely identifying |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@vendor/k8s.io/kube-openapi/pkg/util/util.go` at line 73, Fix the typo in the
package comment where "uniquely indentifying" appears—replace "indentifying"
with "identifying" so the sentence reads "for uniquely identifying"; locate the
comment near the OpenAPI canonical names description (the line referencing
"OpenAPI canonical names are Go type names with full package path, for uniquely
indentifying") and update the word only.
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.34.1 to 0.35.2. - [Commits](kubernetes/apimachinery@v0.34.1...v0.35.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-version: 0.35.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
193a8f0 to
293d98c
Compare
|
/close |
|
@smg247: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
Bumps k8s.io/apimachinery from 0.34.1 to 0.35.2.
Commits
72d71eaMerge remote-tracking branch 'origin/master' into release-1.35e2a2dbcBump golang.org/x/crypto to v0.45.02e9c228Merge pull request #135131 from Dev1622/sig-storage/mock-expand-flake-fixf274aacvendor: update vendor and license metadata after replacing BeTrue usage in cs...9445443Resolve lint restriction on BeTrue by introducing Succeed() with contextual e...52154f7Update vendored dependencies5a348c5KEP-5471: Extend tolerations operators (#134665)6f89492Merge pull request #133648 from richabanker/merged-discoveryc77dde2util/sort: Add MergePreservingRelativeOrder for topological sorting729c13dMerge pull request #134624 from yt2985/podcertificates-betaDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Summary by CodeRabbit
Release Notes
New Features
Chores