Skip to content

Conversation

@sallyom
Copy link
Contributor

@sallyom sallyom commented Aug 6, 2020

from go docs:

from "path" overview:
Package path implements utility routines for manipulating slash-separated paths.
The path package should only be used for paths separated by forward slashes, such as the paths in URLs. This package does not deal with Windows paths with drive letters or backslashes; to manipulate operating system paths, use the path/filepath package.
"path/filepath" overview:
Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths.
The filepath package uses either forward slashes or backslashes, depending on the operating system. To process paths such as URLs that always use forward slashes regardless of the operating system, see the path package.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Aug 6, 2020
@openshift-ci-robot
Copy link

@sallyom: This pull request references Bugzilla bug 1807714, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (3.11.z) matches configured target release for branch (3.11.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1807714: oc set volume use 'filepath' not 'path' to manipulate filepaths

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/test-infra repository.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sallyom
To complete the pull request process, please assign soltysh
You can assign the PR to them by writing /assign @soltysh in a comment when ready.

The full list of commands accepted by this bot can be found 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

@jwforres jwforres removed their request for review August 10, 2020 13:27
@sallyom
Copy link
Contributor Author

sallyom commented Aug 10, 2020

/retest

@sallyom
Copy link
Contributor Author

sallyom commented Aug 10, 2020

/assign @soltysh

@openshift-ci-robot
Copy link

@sallyom: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/unit 3e90bf6 link /test unit
ci/prow/e2e-gcp 3e90bf6 link /test e2e-gcp

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

for _, c := range containers {
for _, m := range c.VolumeMounts {
if path.Clean(m.MountPath) == path.Clean(opts.MountPath) && m.Name != o.Name {
if filepath.Clean(m.MountPath) == filepath.Clean(opts.MountPath) && m.Name != o.Name {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.... that's not quite correct, b/c in containers we always want to use forward slashes, that's why path was being used here. Have you got a chance to verify this on a windows machine?

Copy link
Contributor Author

@sallyom sallyom Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, i see. I'll set up a development Win machine, I started doing that but then this looked straight forward - i was wrong on that, though, I'll set it up and will report back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soltysh I was able to test this in Windows :) while the path->path/filepath change results in no undesired prefix, it does end up with backwards rather than forward slash in the mountPath. See here: https://bugzilla.redhat.com/show_bug.cgi?id=1807714#c10

@sallyom
Copy link
Contributor Author

sallyom commented Aug 14, 2020

surprise - when I tried to reproduce the bug in a 3.11 cluster with oc 3.11, I could not reproduce. I've updated the bug and am closing this PR.

@sallyom sallyom closed this Aug 14, 2020
@openshift-ci-robot
Copy link

@sallyom: This pull request references Bugzilla bug 1807714. The bug has been updated to no longer refer to the pull request using the external bug tracker.

Details

In response to this:

Bug 1807714: oc set volume use 'filepath' not 'path' to manipulate filepaths

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants