Skip to content

Conversation

@rikatz
Copy link
Member

@rikatz rikatz commented Oct 17, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Separate conformance tests dependencies from main tests, and allow generating a binary to run conformance on a different machine

Which issue(s) this PR fixes:
Fixes #3318

Does this PR introduce a user-facing change?:

Move conformance dependencies out of primary go.mod

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 17, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rikatz
Once this PR has been reviewed and has the lgtm label, please assign aojea 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 17, 2025
Copy link
Contributor

@kflynn kflynn left a comment

Choose a reason for hiding this comment

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

This looks really good, thanks! One question from my end.

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @rikatz, this is great!

k8s.io/client-go v0.34.1
k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
sigs.k8s.io/controller-runtime v0.22.3
Copy link
Member

Choose a reason for hiding this comment

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

What's left that still requires a controller-runtime dependency?

Copy link
Member Author

@rikatz rikatz Oct 19, 2025

Choose a reason for hiding this comment

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

the pkg/test uses envtest, which is part of controller-runtime.

Probably as part of the VAP tests effort we can split it as well, and get rid once for all of controller-runtime as an API dependency

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 18, 2025
Copy link
Contributor

@dprotaso dprotaso left a comment

Choose a reason for hiding this comment

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

I believe introducing a new go module into the repository will now require additional changes to the release process

See: https://go.dev/doc/modules/managing-source?utm_source=chatgpt.com#multiple-module-source


go 1.24.0

replace sigs.k8s.io/gateway-api => ../
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically you don't need this given you have the go.work folder

and allow generating a binary to run conformance on a different machine

Also having the replace will prevent go install and go run from working.

Copy link
Member Author

Choose a reason for hiding this comment

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

what's the case of having "go install" or "go run" here as we don't have a "main"?

I agree that replacement may be problematic in case we try to do some "go install", but "go run" works fine:

go run ./tools/gepstoc/main.go 

the "tools" directory has its own go.mod already. Did I missed something?

k8s.io/client-go v0.34.1
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
sigs.k8s.io/controller-runtime v0.22.3
sigs.k8s.io/gateway-api v0.0.0-00010101000000-000000000000
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious what this pseudo version means exactly?

In order for the build to work I think we'll need to have automation to update this module version

eg.

  1. A commit makes a change to the sigs.k8s.io/gateway-api module
  2. Automation then needs to bump the version in this module file

Unsure if we want to do this as part of every release (more error prone) or every commit (then you could build the conformance binary at HEAD). One caveat is we'd want to make sure this doesn't trigger an infinite loop.

Copy link
Member Author

Choose a reason for hiding this comment

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

The pseudo version is related to the replacement we are doing, mostly saying "we don't care, use the latest from the replacement"

Similar to Kubernetes main repo: https://github.com/kubernetes/kubernetes/blob/master/go.mod#L88

As we are not building binaries, but APIs, it makes sense that we keep the "go.mod" of the API as clean as possible, with the "cost" IMO of the inner modules that we don't provide to consumers with these kind of tweaks.

@rikatz rikatz force-pushed the move-tools-conformance-tests branch from f56f22b to 5567d48 Compare October 20, 2025 12:50
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 20, 2025
@rikatz
Copy link
Member Author

rikatz commented Oct 20, 2025

@dprotaso btw, as you are here, do you mind trying to build knative with the changes above? I may try doing it as well with knative and other implementations, mostly willing to see if something will break on someone's build env

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2025
@rikatz rikatz force-pushed the move-tools-conformance-tests branch from 5567d48 to 48626b4 Compare November 3, 2025 17:51
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2025
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. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage our tools' dependencies in a structured way

5 participants