Skip to content

parallels: Fix wrong format string in Debugf call - #23663

Merged
nirs merged 1 commit into
kubernetes:masterfrom
rishiraj38:fix-parallels-debugf-format-verb
Sep 7, 2026
Merged

nirs merged 1 commit into
kubernetes:masterfrom
rishiraj38:fix-parallels-debugf-format-verb

Conversation

@rishiraj38

Copy link
Copy Markdown
Contributor

Problem

log.Debugf in parallels_darwin.go:425 uses %d (integer format verb) for the ver argument, which is of type *github.com/hashicorp/go-version.Version. This is incorrect because %d expects an integer.

On some Go versions (e.g. go1.26.0), go vet flags this as a build error, causing make gotest to fail with:

pkg/drivers/parallels/parallels_darwin.go:425:47: log.Debugf format %d has arg ver of wrong type *github.com/hashicorp/go-version.Version

Solution

Change the format verb from %d to %s. The *go-version.Version type implements the Stringer interface (String() method), so %s is the correct verb to print the version string.

log.Debugf on line 425 used %d (integer format) for the 'ver'
argument, which is of type *github.com/hashicorp/go-version.Version.
This is incorrect because %d expects an integer. On some Go versions
(e.g. go1.26.0), go vet flags this as a build error, causing
'make gotest' to fail with:

  log.Debugf format %d has arg ver of wrong type
  *github.com/hashicorp/go-version.Version

Fix by changing the format verb from %d to %s. The Version type
implements the Stringer interface, so %s correctly prints the
version string.

Signed-off-by: Rishi Raj <[email protected]>
@kubernetes-prow
kubernetes-prow Bot requested review from nirs and spowelljr September 7, 2026 16:05
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 7, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @rishiraj38. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@minikube-bot

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirs, rishiraj38

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 7, 2026
@nirs nirs changed the title parallels: fix wrong format verb in Debugf call parallels: Fix wrong format string in Debugf call Sep 7, 2026
@nirs
nirs merged commit a0810da into kubernetes:master Sep 7, 2026
30 of 32 checks passed
@nirs nirs added this to the minikube 1.40 milestone Sep 8, 2026
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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants