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 4 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. Compare 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

Pull Request Test Coverage Report for Build 12814051495

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.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 22.302%

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%
Totals Coverage Status
Change from base Build 12807092649: -0.03%
Covered Lines: 10378
Relevant Lines: 46534

💛 - Coveralls

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.

2 participants