Skip to content

Use the GroupVersion.Version instead of the resources' preferred version#176

Merged
kcp-ci-bot merged 1 commit into
kcp-dev:mainfrom
ntnn:fix-agg-api-server
Jun 30, 2026
Merged

Use the GroupVersion.Version instead of the resources' preferred version#176
kcp-ci-bot merged 1 commit into
kcp-dev:mainfrom
ntnn:fix-agg-api-server

Conversation

@ntnn

@ntnn ntnn commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

APIResource.Version may be empty:
https://github.com/kubernetes/apimachinery/blob/6fa8dff7b19f13e310ef489972c8f394a9c185ad/pkg/apis/meta/v1/types.go#L1235-L1237

Additionally it reports the resources' preferred version, not the version it was listed for per APIResourceList.GroupVersion: https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/types.go

I believe this is irrelevant in most cases however we hit this when using api-syncagent against resources provided by an aggregated API server, which does not fill the .Version on the resource.

What Type of PR Is This?

/kind bug

Related Issue(s)

Fixes #

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 30, 2026
@ntnn

ntnn commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-0.32

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

@ntnn: once the present PR merges, I will cherry-pick it on top of release-0.32 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-0.32

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.

@xrstf

xrstf commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

/approve
/lgtm

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

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

The pull request process is described here

Details 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

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 06b3609344766c711fa7a79866040cac44fa91c3

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 30, 2026
APIResource.Version may be empty:
https://github.com/kubernetes/apimachinery/blob/6fa8dff7b19f13e310ef489972c8f394a9c185ad/pkg/apis/meta/v1/types.go#L1235-L1237

Additionally it reports the resources' preferred version, not the version it was listed for per APIResourceList.GroupVersion:
https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/types.go

I believe this is irrelevant in most cases however we hit this when
using api-syncagent against resources provided by an aggregated API
server, which does not fill the .Version on the resource.

Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
@ntnn ntnn force-pushed the fix-agg-api-server branch from 7e1f3e9 to 22e7630 Compare June 30, 2026 12:48
@kcp-ci-bot kcp-ci-bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2026
@kcp-ci-bot kcp-ci-bot requested a review from xrstf June 30, 2026 12:48
@ntnn ntnn added this to tbd Jun 30, 2026
@ntnn ntnn moved this to In review in tbd Jun 30, 2026
@xrstf

xrstf commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 954265ce07d3962d21c591f3157d4f65b6c9fd6c

@kcp-ci-bot kcp-ci-bot merged commit 934aaf1 into kcp-dev:main Jun 30, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in tbd Jun 30, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

@ntnn: cannot checkout release-0.32: error checking out "release-0.32": exit status 1 error: pathspec 'release-0.32' did not match any file(s) known to git

Details

In response to this:

/cherry-pick release-0.32

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.

@ntnn

ntnn commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-0.31

@ntnn ntnn deleted the fix-agg-api-server branch June 30, 2026 13:18
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

@ntnn: cannot checkout release-0.31: error checking out "release-0.31": exit status 1 error: pathspec 'release-0.31' did not match any file(s) known to git

Details

In response to this:

/cherry-pick release-0.31

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.

@ntnn

ntnn commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-0.7

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

@ntnn: new pull request created: #177

Details

In response to this:

/cherry-pick release-0.7

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.

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. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants