🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Aug 11, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This is a fix for validation error messages produced by the APIEnablementOptions.Validate. Error message for unknown API groups didn't contain versions, which could be confusing. Here is an example of the latest one from this failing ci-node-e2e-crio-cgrpv2-dra-1-34 job:
F0810 13:37:19.210421 2969 services.go:119] Failed to run e2e services: failed to validate ServerRunOptions: unknown api groups api. With this fix the error would be more descriptive and easier to understand: Failed to run e2e services: failed to validate ServerRunOptions: unknown api groups api/stable1

Updated API group validation logic to improve error reporting. The Validate method now checks for unknown API groups using group versions and provides more descriptive error messages when invalid or unknown API groups are encountered.
Unit test cases are updated to match the new error messages.

Which issue(s) this PR is related to:

#133460

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Aug 11, 2025
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.34 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.34.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Aug 11 10:25:10 UTC 2025.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 11, 2025
@k8s-ci-robot k8s-ci-robot added area/apiserver do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 11, 2025
@bart0sh bart0sh marked this pull request as draft August 11, 2025 16:02
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2025
@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from b31e476 to 15c6e61 Compare August 11, 2025 16:22
@bart0sh
Copy link
Contributor Author

bart0sh commented Aug 11, 2025

/test pull-kubernetes-integration

@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from 15c6e61 to b61da1f Compare August 11, 2025 16:46
@bart0sh
Copy link
Contributor Author

bart0sh commented Aug 11, 2025

/test pull-kubernetes-integration
/test pull-kubernetes-e2e-gce

@bart0sh bart0sh marked this pull request as ready for review August 11, 2025 18:37
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2025
@k8s-ci-robot k8s-ci-robot requested review from enj and liggitt August 11, 2025 18:37
@bart0sh
Copy link
Contributor Author

bart0sh commented Aug 11, 2025

@bart0sh bart0sh marked this pull request as draft August 11, 2025 19:04
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2025
@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from b61da1f to b82fd7a Compare August 12, 2025 06:02
@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from 1d77400 to b169e8b Compare August 12, 2025 11:16
@bart0sh
Copy link
Contributor Author

bart0sh commented Aug 12, 2025

/test pull-kubernetes-integration
/test pull-kubernetes-e2e-gce
/test pull-kubernetes-unit
/test pull-kubernetes-verify

@bart0sh bart0sh marked this pull request as ready for review August 12, 2025 13:13
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2025
@bart0sh
Copy link
Contributor Author

bart0sh commented Aug 12, 2025

/retest

@yongruilin
Copy link
Contributor

/triage accepted
/cc @siyuanfoundation

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 12, 2025
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 10, 2025
@pohly
Copy link
Contributor

pohly commented Nov 10, 2025

/remove-lifecycle stale

/assign @siyuanfoundation

Can we move forward this? @siyuanfoundation, please reassign if you don't want to or can't review.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 10, 2025
@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from b169e8b to 8489bbc Compare November 12, 2025 08:52
@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from 8230dc7 to ab72796 Compare November 20, 2025 11:16
if len(groups) != 0 {
errors = append(errors, fmt.Errorf("unknown api groups %s", strings.Join(groups, ",")))
if len(unknownGroupVersions) != 0 {
errors = append(errors, fmt.Errorf("unknown api groups %s", strings.Join(unknownGroupVersions.UnsortedList(), ",")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use sets.List(unknownGroupVersions)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 20, 2025

/retest

Updated API group validation logic to improve error reporting.
The Validate method now provides more descriptive error messages
when unknown API groups are encountered.
Unit test cases are updated to match the new error messages.

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
@bart0sh bart0sh force-pushed the PR193-refactor-api-enablement branch from ab72796 to 392bb8e Compare November 20, 2025 16:35
@liggitt
Copy link
Member

liggitt commented Nov 20, 2025

/lgtm
/approve
/milestone v1.36

@k8s-ci-robot k8s-ci-robot added this to the v1.36 milestone Nov 20, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 20, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 406eeabac413ebc4db076297a0c97f39ab96666f

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bart0sh, liggitt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2025
@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 20, 2025

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants