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 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).

This PR presents two options:

    1. local only test using github actions
    1. shared practice using cluster-api standardization script (preferred)

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:

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mmerkes for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 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

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).
@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
Comment on lines +50 to +66
gomod-dotzero-check:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
show-progress: false
- name: "tests/e2e/go.mod must use Go version major.minor.0"
env:
GO_MOD_FILE: go.mod
run: |
test $(grep "^go " $GO_MOD_FILE | awk '{print $2}' | cut -d. -f3) != 0 && exit 1
- name: "tests/e2e/go.mod must use Go version major.minor.0"
env:
GO_MOD_FILE: tests/e2e/go.mod
run: |
test $(grep "^go " $GO_MOD_FILE | awk '{print $2}' | cut -d. -f3) != 0 && exit 1
Copy link
Member

Choose a reason for hiding this comment

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

We should be able to drop this in favour of if the make check. As its passing as a presubmit should already be mandatory for PRs right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Being able to run the same checks locally would be very helpful, and then running that same check in an action gives us continual testing of that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

5 participants