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

hack verify.sh: clean up "base" #127754

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

skitt
Copy link
Member

@skitt skitt commented Sep 30, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This is a follow-up for commit beb51e1 ("make verify: run checks in
all module hack directories"). Checking only modules known to go ends
up ignoring modules which aren't dependencies, such as
./staging/src/k8s.io/code-generator/examples/hack; but the checks
should be run there too. So this finds modules by looking for go.mod
files.

Use PWD in run-checks to record failing verification scripts instead
of a hidden dependency on an externally-set variable.

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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 30, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Sep 30, 2024
@@ -234,10 +234,9 @@ ret=0
modules=() # Pacify shellcheck
kube::util::read-array modules < <(go list -f '{{.Dir}}' -m)
Copy link
Member

Choose a reason for hiding this comment

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

I just realize this omits these two

./staging/src/k8s.io/code-generator/examples/hack
./staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack

do we need them?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, nice catch — what prompted me to do all this initially is ./staging/src/k8s.io/code-generator/examples/hack, so yes, we do need them!

@skitt skitt force-pushed the followup-module-verify branch from 1e5d228 to ab72a65 Compare September 30, 2024 16:12
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 30, 2024
This is a follow-up for commit beb51e1 ("make verify: run checks in
all module hack directories"). Checking only modules known to go ends
up ignoring modules which aren't dependencies, such as
./staging/src/k8s.io/code-generator/examples/hack; but the checks
should be run there too. So this finds modules by looking for go.mod
files.

Use PWD in run-checks to record failing verification scripts instead
of a hidden dependency on an externally-set variable.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@skitt skitt force-pushed the followup-module-verify branch from ab72a65 to be0cd19 Compare September 30, 2024 16:14
@aojea
Copy link
Member

aojea commented Oct 5, 2024

/lgtm
/assign @thockin

it seems now it runs the examples

diffing /home/prow/go/src/k8s.io/kubernetes/staging/src/k8s.io/code-generator/examples against freshly generated codegen
/home/prow/go/src/k8s.io/kubernetes/staging/src/k8s.io/code-generator/examples up to date.
Smoke testing examples by compiling...
/home/prow/go/src/k8s.io/kubernetes/staging/src/k8s.io/code-generator/examples /home/prow/go/src/k8s.io/kubernetes/staging/src/k8s.io/code-generator/examples
/home/prow/go/src/k8s.io/kubernetes/staging/src/k8s.io/code-generator/examples
+++ exit code: 0

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

LGTM label has been added.

Git tree hash: d9cfbecff025d52e550eed96701259eaa6e4a27d

@dims
Copy link
Member

dims commented Oct 13, 2024

/sig testing
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 13, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, skitt

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 Oct 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit 1bda3ef into kubernetes:master Oct 13, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.32 milestone Oct 13, 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. 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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants