pkg/machine: remove unused InstalledProviders function - #29336
pkg/machine: remove unused InstalledProviders function#29336Aryanbhargava18 wants to merge 1 commit into
Conversation
danishprakash
left a comment
There was a problem hiding this comment.
Do we even need InstalledProviders, doesn't seem to be used afaict. cc/ @ashley-cui
|
Good catch @danishprakash. I audited the tree and I'm happy to push a commit to this PR dropping the function and its tests entirely if you and @ashley-cui agree. |
|
Looks like dead code to me, I'd be okay with removing it. |
8b5ad71 to
6c11745
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
I've dropped InstalledProviders() and its associated tests entirely in the latest commit as discussed. Ready for another look whenever you have time @danishprakash @ashley-cui. |
danishprakash
left a comment
There was a problem hiding this comment.
There seems to be some issues, can you please run make validatepr and fix them?
6c11745 to
4213bfe
Compare
Deleting the function left behind an unused import (define) in platform.go. I've dropped the unused import and ran gofmt in the latest push. It should be fine now. |
| "go.podman.io/podman/v6/pkg/machine/vmconfigs" | ||
| ) | ||
|
|
||
| func InstalledProviders() ([]define.VMType, error) { |
There was a problem hiding this comment.
do you mind also cleaning up SupportedProviders and associated tests? that's also dead
There was a problem hiding this comment.
do you mind also cleaning up
SupportedProvidersand associated tests? that's also dead
Done. I went ahead and purged SupportedProviders and its associated tests across all architectures since they were dead code as well.
The InstalledProviders function was only used in its own tests and is otherwise dead code. Removing it entirely cleans up the API surface. Signed-off-by: Aryanbhargava18 <aryanbhargava644@gmail.com>
4213bfe to
f3d79ba
Compare
Checklist
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)What this PR does / why we need it:
The
InstalledProvidersfunction inpkg/machine/provider/platform.gois unused everywhere in the codebase except within its own test cases. This PR removes the dead code entirely to clean up the API surface.Does this PR introduce a user-facing change?