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

🌱 Enable requiredfields linter #11908

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

sivchari
Copy link
Member

What this PR does / why we need it:

Part of #11834

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/area api

@k8s-ci-robot k8s-ci-robot added area/api Issues or PRs related to the APIs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 27, 2025
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 27, 2025
@JoelSpeed JoelSpeed mentioned this pull request Feb 27, 2025
14 tasks
Comment on lines 47 to 49
# requiredFields:
# pointerPolicy: Warn | SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think best to leave the config "shadow" so that we can see what we could configure if we decided to change

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

@JoelSpeed
Copy link
Contributor

Would be good to squash the commits for this PR, but otherwise LGTM

@sivchari
Copy link
Member Author

Should I summarize the commits ?

@JoelSpeed
Copy link
Contributor

I think in this case we don't need the individual history of the changes on this branch. I'd encourage us to try and keep commits atomic. So if we are making fixups later, lets squash those into the commits earlier in the branch that introduced the bit that needed fixing (eg in this case, the first commit added some unwanted indentation, the second puts it back to how it was before, we should squash 2 into 1 here)

@sivchari
Copy link
Member Author

Okay!

@sbueringer
Copy link
Member

On these kind of PRs I would expect just one commit. I'm also fine in general with just squashing via Prow if the first commit has an appropriate title

@sivchari sivchari force-pushed the enable-requiredfields branch from bea3cf0 to 8d799a7 Compare February 28, 2025 01:37
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2025
@sivchari sivchari force-pushed the enable-requiredfields branch from 8d799a7 to fcbaed5 Compare February 28, 2025 01:47
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2025
@chrischdi
Copy link
Member

/lgtm

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

LGTM label has been added.

Git tree hash: 1c3db99f4ded2ba33ae24c6ce3b4a6aa51458d5f

@sbueringer
Copy link
Member

sbueringer commented Feb 28, 2025

Needs rebase.

Let's go ahead and merge this PR after rebase. But I would expect once we add required markers in the other PR this linter might show some findings in v1beta1. They should then be ignored (on that other PR)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2025
@sivchari sivchari force-pushed the enable-requiredfields branch from fcbaed5 to ffc6258 Compare March 3, 2025 09:53
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2025
@k8s-ci-robot k8s-ci-robot requested a review from chrischdi March 3, 2025 09:53
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2025
@sbueringer
Copy link
Member

/lgtm
/approve

Probably the other PRs will need a rebase once this one merges

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

LGTM label has been added.

Git tree hash: ac545d9296a42a021f15aef478284fa480ae60b3

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 3, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

@sivchari
Copy link
Member Author

sivchari commented Mar 3, 2025

After nobools linter is merged, I rebase this.

@sivchari sivchari force-pushed the enable-requiredfields branch from ffc6258 to 046588d Compare March 3, 2025 10:24
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2025
@k8s-ci-robot k8s-ci-robot requested a review from sbueringer March 3, 2025 10:24
@JoelSpeed
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: 2089eb63733bc5ce287edb88ec1fe290cfec1309

@k8s-ci-robot k8s-ci-robot merged commit 4e60bd3 into kubernetes-sigs:main Mar 3, 2025
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.10 milestone Mar 3, 2025
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/api Issues or PRs related to the APIs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants