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

Remove kubevirt/pkg/controller dependency #4933

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

xrstf
Copy link

@xrstf xrstf commented Jan 16, 2025

Pull Request

What type of this PR

  • Refactoring

By importing kubevirt.io/kubevirt, KubeOVN also has to import and deal with an incredible amount of legacy cruft. Compared to kubevirt.io/api, the Go dependencies of the main kubevirt module are not so very much up-to-date.

KubeOVN only uses a single struct from the kubevirt codebase, and of that struct just very little. I propose that it is cheaper and in the long-term more maintainable to copy-paste the required code into this repository. This gets rid of the heavy dependency and quite a few replace directives. This in turn helps other projects that import KubeOVN into their codebase.

Since both projects are Apache Licensed, I would consider this an okay-ish hack with more upsides than downsides.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Jan 16, 2025
@coveralls
Copy link

coveralls commented Jan 17, 2025

Pull Request Test Coverage Report for Build 13014792021

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 72 (0.0%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 22.299%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller/controller.go 0 1 0.0%
pkg/controller/kubevirt.go 0 1 0.0%
pkg/informer/kubevirt.go 0 70 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/ovs/ovn-nb-logical_router_route.go 2 74.93%
Totals Coverage Status
Change from base Build 13001575806: -0.03%
Covered Lines: 10374
Relevant Lines: 46522

💛 - Coveralls

@oilbeater
Copy link
Collaborator

@xrstf the conflict need to be resolved.

@xrstf xrstf force-pushed the remove-kubevirt-ctrl-dependency branch from 9d294a3 to 87a33c1 Compare January 28, 2025 16:14
@xrstf xrstf force-pushed the remove-kubevirt-ctrl-dependency branch from 87a33c1 to 019d6bf Compare January 28, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants