--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/7ceff6d5-08b6-40cc-b08f-f185855988f0n%40googlegroups.com.
Hey Ben!Personally I don't understand what are the downsides of moving this package to /pkg.The claim that Kubevirt packages cannot be easily importable needs to be addressed, but anyhow libdv, just as libvmi, should not be aimed to be a test package. Keeping it under /tests just makes things worse, as test-dedicated code (like gomega.Expects and such) is more likely to slip in, just like happened with libvmi. I think we should aim to make this package importable, and should move it away from tests as early as possible when it's easy to do so.p.s. Even if I leave the importability of the package aside, I don't see libvmi or libdv as test packages. Sure, most of the code that's creating VMs lives under /tests, but the package is not inherently a test package. A controller using libdv to define data volumes for VMs or a different controller using libmigration to create migrations more easily makes total sense to me.Are there any downsides to moving this to /pkg?
I would generally discourage usage of any code from Kubevirt. We do not provide any compatibility guaranteesNormally projects would aim to avoid such imports (similarly to how you would avoid kubernetes/kubernetes) and instead
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/d2ea08cb31c3b8c8b2182e77570bfd5b5ffa438f.camel%40redhat.com.
I don't see an issue with moving/owning it under sig-storage but just to echo again the concern about importing kubevirt/kubevirt
From an older thread:I would generally discourage usage of any code from Kubevirt. We do not provide any compatibility guaranteesNormally projects would aim to avoid such imports (similarly to how you would avoid kubernetes/kubernetes) and instead
they maintain separate go packages under the main project that get published on releases:
https://github.com/kubernetes/kubernetes/tree/0e1abc4d18e3531e96ea20d03bc5cfb3d57a89d6/staging/src/k8s.io/component-helpers
https://github.com/kubernetes/component-helpers
https://pkg.go.dev/k8s.io/component-helpers
We do something similar for kubevirt.io/api but I am not sure if we can/want to replicate that for libvmi/libdv
On Wed, Nov 27, 2024 at 10:23 AM Felix Matouschek <fmato...@redhat.com> wrote:Hey,Am Mittwoch, dem 27.11.2024 um 10:07 +0200 schrieb Itamar Holder:Hey Ben!Personally I don't understand what are the downsides of moving this package to /pkg.The claim that Kubevirt packages cannot be easily importable needs to be addressed, but anyhow libdv, just as libvmi, should not be aimed to be a test package. Keeping it under /tests just makes things worse, as test-dedicated code (like gomega.Expects and such) is more likely to slip in, just like happened with libvmi. I think we should aim to make this package importable, and should move it away from tests as early as possible when it's easy to do so.p.s. Even if I leave the importability of the package aside, I don't see libvmi or libdv as test packages. Sure, most of the code that's creating VMs lives under /tests, but the package is not inherently a test package. A controller using libdv to define data volumes for VMs or a different controller using libmigration to create migrations more easily makes total sense to me.Are there any downsides to moving this to /pkg?I would not expect any downsides for KubeVirt itself, but importing kubevirt/kubevirt into another project can be a big pain because of the high amount of indirect dependencies that are pulled in.I'm not sure we should promote importing kubevirt/kubevirt into other projects for this reason.
----On Tue, 26 Nov 2024 at 15:04, Ben Oukhanov <bouk...@redhat.com> wrote:Hi,I've opened pull request (PR) #13333 to raise this discussion.This tests/libdv package contains NewDataVolume function options that helps us to construct a new v1.VirtualMachine in other projects, e.g. here as an example.Currently tests/libdv used only in functional tests and not recommended to be imported by other projects, because test code likely tend to be changed or removed (like tests/utils.go).I'd like simply to copy libdv from tests to the pkg folder that is likely not to be changed or remvoed, similarly to the pkg/libvmi, so we can import it safely.What would be your opinion about it? Alex Kalenyuk said in the PR that sig-storage can be the owner of the new pkg/libdv.Thanks,Ben
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/d2ea08cb31c3b8c8b2182e77570bfd5b5ffa438f.camel%40redhat.com.
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/CAHahevfs2ydTGgLAB9t292AFe4RF2%3D1sCXLeLZNTYr54Uy2RQg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/CAHahevfs2ydTGgLAB9t292AFe4RF2%3D1sCXLeLZNTYr54Uy2RQg%40mail.gmail.com.
I think the suggestion to promote libdv is valid.I would try to take an existing unit-test and use it as a caller, to express the usage and internal need,same as we did with libvmi.
Lastly, the existing import list of the package needs to be revisited.E.g. "kubevirt.io/kubevirt/pkg/pointer" cannot remain there.On Wed, Nov 27, 2024 at 10:36 AM Alex Kalenyuk <akal...@redhat.com> wrote:I don't see an issue with moving/owning it under sig-storage but just to echo again the concern about importing kubevirt/kubevirt
From an older thread:I would generally discourage usage of any code from Kubevirt. We do not provide any compatibility guaranteesNormally projects would aim to avoid such imports (similarly to how you would avoid kubernetes/kubernetes) and instead
they maintain separate go packages under the main project that get published on releases:
https://github.com/kubernetes/kubernetes/tree/0e1abc4d18e3531e96ea20d03bc5cfb3d57a89d6/staging/src/k8s.io/component-helpers
https://github.com/kubernetes/component-helpers
https://pkg.go.dev/k8s.io/component-helpersI understand the concern.But at the same time, for the same reasons a package could be used from outside the project as requested here,the package maintainer should have an interest to keep it "clean", modular and easy to consume without a dependency hell.Even internal k/k packages have an interest to import only "clean" packages, avoiding taking in half the project as a dependency.
We do something similar for kubevirt.io/api but I am not sure if we can/want to replicate that for libvmi/libdvWe could, but it is probably not worth it.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/CALmkdFRttYqL7eUxCRSbELOrzpeprNb2uX-a2_VLxNgoxaZw_w%40mail.gmail.com.
On Wed, Nov 27, 2024 at 10:35 AM Edward Haas <edw...@redhat.com> wrote:I think the suggestion to promote libdv is valid.I would try to take an existing unit-test and use it as a caller, to express the usage and internal need,same as we did with libvmi.I am not against promoting libdv, libvmi and such but I do have a concern that I have raised in the past https://github.com/kubevirt/kubevirt/pull/11005. I think this is generic enough and applies to libdv as well. As an external user of these packages I would probably be dissatisfied with the current state.
Lastly, the existing import list of the package needs to be revisited.E.g. "kubevirt.io/kubevirt/pkg/pointer" cannot remain there.On Wed, Nov 27, 2024 at 10:36 AM Alex Kalenyuk <akal...@redhat.com> wrote:I don't see an issue with moving/owning it under sig-storage but just to echo again the concern about importing kubevirt/kubevirt
From an older thread:I would generally discourage usage of any code from Kubevirt. We do not provide any compatibility guaranteesNormally projects would aim to avoid such imports (similarly to how you would avoid kubernetes/kubernetes) and instead
they maintain separate go packages under the main project that get published on releases:
https://github.com/kubernetes/kubernetes/tree/0e1abc4d18e3531e96ea20d03bc5cfb3d57a89d6/staging/src/k8s.io/component-helpers
https://github.com/kubernetes/component-helpers
https://pkg.go.dev/k8s.io/component-helpersI understand the concern.But at the same time, for the same reasons a package could be used from outside the project as requested here,the package maintainer should have an interest to keep it "clean", modular and easy to consume without a dependency hell.Even internal k/k packages have an interest to import only "clean" packages, avoiding taking in half the project as a dependency.
We do something similar for kubevirt.io/api but I am not sure if we can/want to replicate that for libvmi/libdvWe could, but it is probably not worth it.Why not @Edward Haas ?
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/CALmkdFT_xChPxdQyx0cRZAB3JNV4zFduF32svM_x-A2h1bSLww%40mail.gmail.com.
Different discussion for the `pointer` pkg. To me, it is still complete and should be moved outside of kv/kv repo.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/b9e03b81-da5e-48a6-ab0e-67f1e9ab477fn%40googlegroups.com.
We can, and should, discuss how we make packages externally consumable.
While this discussion here is important, I think it diverges a bit from what Ben's PR actually does, which is only to move libdv away from /tests.
Even if we discourage importing kubevirt packages, libdv inherently is not a test package and should not bring test-related dependencies. Keeping it under /tests has no advantages that I can think of, and has the disadvantage of increasing the probability of slipping in test packages as dependencies, making the package inconsumable from production code. It is true that, as a bonus, it's a step towards making it consumable externally as well.
On Friday, November 29, 2024 at 2:35:33 PM UTC+1 Itamar Holder wrote:We can, and should, discuss how we make packages externally consumable.Do you think we can discuss it as part of the code quality WG?Daniel's suggestion about adding metrics for this looks interesting to me as well.
While this discussion here is important, I think it diverges a bit from what Ben's PR actually does, which is only to move libdv away from /tests.For me, Ben's PR hits a pain point, so I don't think this discussion deviates too much.What was the initial reason for not having this package in production code?
Even if we discourage importing kubevirt packages, libdv inherently is not a test package and should not bring test-related dependencies. Keeping it under /tests has no advantages that I can think of, and has the disadvantage of increasing the probability of slipping in test packages as dependencies, making the package inconsumable from production code. It is true that, as a bonus, it's a step towards making it consumable externally as well.Is there production code (potentially other that unit tests), that could make use of it today?
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/e44c4410-f1e6-4e02-ac6c-dc23aa462d77n%40googlegroups.com.