Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require prerelease lifecycle tags on GA types #124898

Merged

Conversation

alexzielenski
Copy link
Contributor

What type of PR is this?

/kind documentation
/kind feature

What this PR does / why we need it:

#122891 requires that all known API types have availability information stored for the k8s versions it was introduced to be able to choose a storage version compatible with an emulated k8s version. We have this information currently for beta types, but not GA. This PR enforces the requirement that GA types have the annotation, and modifies the code generator to not output deprecated/removed implementations for such GA types.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/code-generation kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 15, 2024
@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels May 15, 2024
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@fedebongio
Copy link
Contributor

/assign @sttts @cici37
/triage accepted

@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 May 16, 2024
@sttts
Copy link
Contributor

sttts commented May 21, 2024

Lgtm.

Verify is still red.

Needs an API approver for finally tagging.

cd "${KUBE_ROOT}"
for DOCGLOB in "${DIRGLOBS[@]}"; do
if git --no-pager grep -L '// +k8s:prerelease-lifecycle-gen=true' -- "$DOCGLOB" ":!*api*/*alpha*/doc.go"; then
echo "!!! Some non-alpha packages doc.go do not include prerelease-lifecycle tags."
Copy link
Contributor

Choose a reason for hiding this comment

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

open another PR based on this one that shows this catching a failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@deads2k
Copy link
Contributor

deads2k commented May 22, 2024

Lgtm.

Verify is still red.

Needs an API approver for finally tagging.

@sttts did you confirm the bazillion listed versions were accurate? The mechanics here look correct and if the versions are correct I'm ready to approve once there's a proof PR showing the verify works.

Copy link
Contributor

@jpbetz jpbetz left a comment

Choose a reason for hiding this comment

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

I few of these version numbers didn't match what I found when bisecting with:

git checkout release-<major.minor>
find . -name "types.go" | grep -v "Godeps" | xargs grep struct | grep <Kind>

staging/src/k8s.io/api/rbac/v1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/authentication/v1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/coordination/v1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/networking/v1/types.go Outdated Show resolved Hide resolved
@@ -23,6 +23,7 @@ import (

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.19
Copy link
Contributor

Choose a reason for hiding this comment

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

Event should be 1.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was added because the PR adding this struct was in 1.19 milestone

#91645

Estimated based upon the milestone of the commit that added the original struct header. If the commit wasn't in a milestone used the deprecation of the prior beta api. If that wasn't available inferred the next available release from the date the commit was merged.
@jpbetz
Copy link
Contributor

jpbetz commented May 23, 2024

/lgtm
Deferring to @deads2k for final approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 65215ce1b0318a00232f3bea124dbf997b04441f

@deads2k
Copy link
Contributor

deads2k commented May 29, 2024

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexzielenski, deads2k

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 May 29, 2024
@k8s-ci-robot k8s-ci-robot merged commit 1cfaa95 into kubernetes:master May 29, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone May 29, 2024
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/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. 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. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: Done
Status: Closed / Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants