Skip to content

Conversation

rikatz
Copy link
Member

@rikatz rikatz commented Oct 2, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
This PR moves our tool management out of the main go.mod file, to its own file and relying on the newly added go tool command from Go 1.24

Which issue(s) this PR fixes:
Part of #3318 (should add the structured management later)

Does this PR introduce a user-facing change?:

Remove tools from main go dependencies

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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. labels Oct 2, 2025
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 2, 2025
--config=crd-ref-docs.yaml \
--renderer=markdown \
--output-path=${PWD}/site-src/reference/specx.md
hack/mkdocs/generate.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have a verify job that validates the generated code is correct before merging?

Copy link
Member Author

Choose a reason for hiding this comment

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

This generated file is never merged. The spec.md and specx.md are actually ignored (.gitignore). I kinda moved the job here, but in fact we are taking care of it here: #4132

Which reminds me I will fix the makefile there

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 on the other PR, once it is merged I can get rid of the change here :)

Copy link
Contributor

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

nice!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: howardjohn, rikatz
Once this PR has been reviewed and has the lgtm label, please assign shaneutt 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

@rikatz rikatz force-pushed the remove-tools-from-go-mod branch from 68fd566 to d4b55dc Compare October 2, 2025 16:49
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 6, 2025
set -o pipefail

GOPATH=${GOPATH:-$(go env GOPATH)}
TOOLSMODFILE=${TOOLSMODFILE:-tools/go.mod}
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: remove

# throw away
new_report="$(mktemp -t "$(basename "$0").api_violations.XXXXXX")"

TOOLSMODFILE="${TOOLSMODFILE:-$SCRIPT_ROOT/tools/go.mod}"
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove

readonly GOFLAGS="-mod=readonly"
readonly GOPATH="$(mktemp -d)"
readonly MIN_REQUIRED_GO_VER="$(go list -m -f '{{.GoVersion}}')"
readonly MIN_REQUIRED_GO_VER="$(go list -m -f '{{.GoVersion}}' |head -n1)"
Copy link
Member Author

Choose a reason for hiding this comment

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

This is required because workspace now shows different go versions / lines

Copy link
Member Author

Choose a reason for hiding this comment

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

This can be replaced by go list -m -f '{{.GoVersion}}' sigs.k8s.io/gateway-api

SchemaProps: spec.SchemaProps{
Description: "AllowedRoutes defines which Routes may be attached to this Listener.",
Type: []string{"object"},
Type: []string{"object"},
Copy link
Member Author

Choose a reason for hiding this comment

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

discard this, I guess we already fixed it on another PR

@rikatz
Copy link
Member Author

rikatz commented Oct 6, 2025

One extra comment: We may need a new verify that checks if all the go.mod are tidy'd now

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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants