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
Replace evalSymlink() with powershell command for subPath_windows.go #92328
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jingxu97 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
return "", err | ||
} | ||
linkedPath = strings.TrimSpace(string(output)) | ||
if strings.HasPrefix(linkedPath, "Volume") || strings.HasPrefix(linkedPath, "\\??\\Volume") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need the first condition: strings.HasPrefix(linkedPath, "Volume")
? You can potentially look for other Windows prefixes like \\.\Volume
or maybe even \\
for generic UNC path handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the output from powershell gives Volumexxxx as output without \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref about various path prefixes: https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the code here by adding a volume prefix function. @ddebroy PTAL.
75ec703
to
629d1a6
Compare
In golang, evalSymlink() does not work if windows disk driver letter is not assigned. Replace this function with a powershell command to work around this issue.
/retest |
3 similar comments
/retest |
/retest |
/retest |
Thanks! /lgtm |
/retest Review the full test history for this PR. Silence the bot with an |
13 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
In golang, evalSymlink() does not work if windows disk driver letter is
not assigned. Replace this function with a powershell command to work
around this issue.
This PR address the issue kubernetes/utils#172
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: