Skip to content

Conversation

@mtulio
Copy link
Contributor

@mtulio mtulio commented Oct 24, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Introduce CI step to validate the Go directive is according to the standard used in kubernetes project (ending with .0, x.y.0).

The step introduces the command verify-go-directive which will use a common script from cluster-api project to verify the directive is in conformance with the project standard.

Please leave a comment with your thoughts of which option would be ok to follow the practice by this project.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

The command is executed both in Github Actions and Prow, where Github Actions is handling correctly the exit code.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 24, 2025
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 24, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If cloud-provider-aws contributors determine 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 24, 2025
@mtulio
Copy link
Contributor Author

mtulio commented Oct 24, 2025

/test all

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

this makes sense to me

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 24, 2025
@mtulio
Copy link
Contributor Author

mtulio commented Oct 24, 2025

I just added one more option to validate 'go.mod dotzero' using cluster-api practice, which would be preferred as shares practices from other kube projects (suggested by @damdo, TY). PTAL, would love to hear thoughts which path to go.

@mtulio
Copy link
Contributor Author

mtulio commented Oct 24, 2025

/test pull-cloud-provider-aws-check

@mtulio mtulio changed the title ci/gha: introduce step to check go.mod version ci/gomod: added CI validation to prevent changing patch version of Go from non-zero Oct 24, 2025
@mtulio
Copy link
Contributor Author

mtulio commented Oct 27, 2025

pull-cloud-provider-aws-check is not reporting as expected, the new make command failed and it report as pass: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/cloud-provider-aws/1283/pull-cloud-provider-aws-check/1981728404394741760#1:build-log.txt%3A143

Suggested action items:

  • (short) use make verify-go-directive on GHA
  • (long) fix CI job to track exit code

@mtulio
Copy link
Contributor Author

mtulio commented Oct 27, 2025

pull-cloud-provider-aws-check is not reporting as expected, the new make command failed and it report as pass: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/cloud-provider-aws/1283/pull-cloud-provider-aws-check/1981728404394741760#1:build-log.txt%3A143

Suggested action items:

  • (short) use make verify-go-directive on GHA
  • (long) fix CI job to track exit code

Not sure if I am looking at the correct place, looks like the runner have expected flags to fail

@mtulio mtulio marked this pull request as ready for review October 27, 2025 19:19
@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 Oct 27, 2025
@mtulio
Copy link
Contributor Author

mtulio commented Oct 27, 2025

/retest

Introduce the step to validate if the go.mod is in conformance with
Kubernetes project standard by using the patch version from the build env
(ending with .0, x.y.0).
@mtulio
Copy link
Contributor Author

mtulio commented Oct 28, 2025

PR ready for review based in the step gomod-dotzero-check logs:

curl --retry 3 -fsL https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/refs/tags/v1.11.0/hack/verify-go-directive.sh | bash -s -- -g 1.24.0
Running go directive verify test for ./tests/e2e/go.mod
Running go directive verify test for ./go.mod

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

Thanks

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 28, 2025
Co-authored-by: Damiano Donati <damiano.donati@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 28, 2025
@mtulio
Copy link
Contributor Author

mtulio commented Oct 28, 2025

CI infra issues in job test.

/retest

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

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

mtulio commented Oct 28, 2025

/retest

3 similar comments
@mtulio
Copy link
Contributor Author

mtulio commented Oct 29, 2025

/retest

@damdo
Copy link
Member

damdo commented Oct 29, 2025

/retest

@mtulio
Copy link
Contributor Author

mtulio commented Oct 31, 2025

/retest

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

/lgtm

@mtulio
Copy link
Contributor Author

mtulio commented Oct 31, 2025

/retest

@mtulio
Copy link
Contributor Author

mtulio commented Oct 31, 2025

Hey @kmala , what do you think of this check? Thanks!

/assign @kmala

@kmala
Copy link
Member

kmala commented Oct 31, 2025

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kmala

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 31, 2025
@k8s-ci-robot k8s-ci-robot merged commit 5f1286a into kubernetes:master Oct 31, 2025
14 checks passed
@mtulio mtulio deleted the ci-gomod-check branch October 31, 2025 23:04
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/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. 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.

6 participants