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

🌱 Introduce a new go.mod for test/ #2532

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
This PR introduces a go.mod file for the test/ folder, thus removing kind, docker and other dependencies from the main go.mod file, ultimately reducing the surface for CVEs/vulnerabilities for the CAPV manager

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 6, 2023
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 6, 2023
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-test-main

Makefile Show resolved Hide resolved
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b6c02a9) 63.46% compared to head (8c61199) 64.14%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2532      +/-   ##
==========================================
+ Coverage   63.46%   64.14%   +0.68%     
==========================================
  Files         119      118       -1     
  Lines        8592     8535      -57     
==========================================
+ Hits         5453     5475      +22     
+ Misses       2722     2642      -80     
- Partials      417      418       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

Just some nits, rest looks good!

@@ -41,6 +43,7 @@ func NewMod(path string) (Mod, error) {
}, nil
}

// FindDependencyVersion return the version of a go.mod dependency.
func (m Mod) FindDependencyVersion(dependency string) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we even use this?

Found nothing, maybe in your vcsim branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just moved stuff around, we can clean up as a follow up

internal/test/helpers/vcsim/simulator.go Outdated Show resolved Hide resolved
internal/test/helpers/vcsim/simulator.go Outdated Show resolved Hide resolved
internal/test/helpers/vcsim/simulator.go Outdated Show resolved Hide resolved
internal/test/helpers/vcsim/simulator.go Outdated Show resolved Hide resolved
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

Just some nits, rest looks good!

@chrischdi chrischdi mentioned this pull request Dec 7, 2023
3 tasks
@sbueringer
Copy link
Member

Would be great if we can merge #2527 first. I just want to avoid rebasing #2527

@chrischdi
Copy link
Member

#2527 is now merged, this one requires a rebase :-)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2023
test/go.mod Outdated Show resolved Hide resolved
test/go.mod Outdated Show resolved Hide resolved
test/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
test/framework/framework.go Show resolved Hide resolved
test/go.mod Outdated Show resolved Hide resolved
test/go.mod Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
Makefile Show resolved Hide resolved
@@ -280,6 +281,7 @@ generate-go-deepcopy: $(CONTROLLER_GEN) ## Generate deepcopy go code for core
.PHONY: generate-modules
generate-modules: ## Run go mod tidy to ensure modules are up to date
Copy link
Member

Choose a reason for hiding this comment

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

It's highly likely that we have to introduce a dependabot action (see pr-dependabot.yaml from core CAPI).

But I'm fine waiting for the first time a dependabot PR fails with modules being out of sync and then only adding it if actually needed (it's very likely as we needed it in core CAPI & CR as well as soon as we had multiple modules referencing each other)

@sbueringer
Copy link
Member

Thx! I like that we get rid of a few annoying dependencies in the top-level go.mod file

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2023
@sbueringer
Copy link
Member

sbueringer commented Dec 15, 2023

Last two smaller findings

(#2532 (comment) #2532 (comment))

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 19, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 20, 2023
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-test-main

@sbueringer
Copy link
Member

/lgtm
/approve

/hold
for squash

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 20, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 20, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: de56d6e21539174bd90137fd24a0719adb97b213

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 Dec 20, 2023
@sbueringer
Copy link
Member

Thank you!

/hold cancel

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-apidiff-main 8c61199 link false /test pull-cluster-api-provider-vsphere-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 20, 2023
@k8s-ci-robot k8s-ci-robot merged commit c8371a6 into kubernetes-sigs:main Dec 20, 2023
15 of 16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Dec 20, 2023
@fabriziopandini fabriziopandini deleted the split-go-modules branch January 8, 2024 19:40
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. 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