Skip to content
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

fix: use exec.LookPath function #240

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

guilhem
Copy link
Contributor

@guilhem guilhem commented Jan 28, 2021

This function us standard PATH environment variable

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Use standard function exec.LookPath instead of custom wrote.

Special notes for your reviewer:

Is it a wanted behavior to have path hard-coded? And why

Does this PR introduce a user-facing change?:

no

Use exec.LookPath function

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 28, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @guilhem!

It looks like this is your first PR to kubernetes-csi/csi-driver-host-path 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/csi-driver-host-path has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @guilhem. Thanks for your PR.

I'm waiting for a kubernetes-csi 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.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 28, 2021
@pohly
Copy link
Contributor

pohly commented Jan 28, 2021

This function us standard PATH environment variable

Have you verified that PATH is set when the driver is invoked inside the containers defined in the YAML files?

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 28, 2021
@guilhem
Copy link
Contributor Author

guilhem commented Jan 28, 2021

This function us standard PATH environment variable

Have you verified that PATH is set when the driver is invoked inside the containers defined in the YAML files?

$ make container
$ docker run --rm --entrypoint "/bin/sh"  docker.io/library/hostpathplugin:latest -c "env" 
HOSTNAME=5b84dd50d494
SHLVL=1
HOME=/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/

@pohly
Copy link
Contributor

pohly commented Feb 12, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2021
@pohly
Copy link
Contributor

pohly commented Feb 12, 2021

/assign @jsafrane

for approval

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2021
@pohly
Copy link
Contributor

pohly commented Apr 5, 2021

@guilhem please rebase

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 5, 2021
This function us standard PATH environment variable

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
@guilhem
Copy link
Contributor Author

guilhem commented Apr 5, 2021

@pohly rebased + add signoff in commit message + wrap command error.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 5, 2021
@pohly
Copy link
Contributor

pohly commented Apr 6, 2021

/approve

@pohly
Copy link
Contributor

pohly commented Apr 6, 2021

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guilhem, pohly

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 6, 2021
@k8s-ci-robot k8s-ci-robot merged commit 943c62a into kubernetes-csi:master Apr 6, 2021
xing-yang added a commit to xing-yang/csi-driver-host-path that referenced this pull request Nov 27, 2023
f8c8cc4c Merge pull request kubernetes-csi#237 from msau42/prow
b36b5bfd Merge pull request kubernetes-csi#240 from dannawang0221/upgrade-go-version
adfddcc9 Merge pull request kubernetes-csi#243 from pohly/git-subtree-pull-fix
c4650889 pull-test.sh: avoid "git subtree pull" error
7b175a1e Update csi-test version to v5.2.0
987c90cc Update go version to 1.21 to match k/k
2c625d41 Add script to generate patch release notes
f9d5b9c0 Merge pull request kubernetes-csi#236 from mowangdk/feature/bump_csi-driver-host-path_version
b01fd537 Bump csi-driver-host-path version up to v1.12.0
984feece Merge pull request kubernetes-csi#234 from siddhikhapare/csi-tools
1f7e6059 fixed broken links of testgrid dashboard
de2fba88 Merge pull request kubernetes-csi#233 from andyzhangx/andyzhangx-patch-1
cee895e1 remove windows 20H2 build since it's EOL long time ago
670bb0ef Merge pull request kubernetes-csi#229 from marosset/fix-codespell-errors
35d5e783 Merge pull request kubernetes-csi#219 from yashsingh74/update-registry
63473cc9 Merge pull request kubernetes-csi#231 from coulof/bump-go-version-1.20.5
29a5c76c Merge pull request kubernetes-csi#228 from mowangdk/chore/adopt_kubernetes_recommand_labels
8dd28211 Update cloudbuild image with go 1.20.5
1df23dba Merge pull request kubernetes-csi#230 from msau42/prow
1f92b7e7 Add ginkgo timeout to e2e tests to help catch any stuck tests
2b8b80ea fixing some codespell errors
c10b6780 Merge pull request kubernetes-csi#227 from coulof/check-sidecar-supported-versions
72984ec0 chore: adopt kubernetes recommand label
b0555351 Header
bd0a10b6 typo
c39d73c3 Add comments
f6491af0 Script to verify EOL sidecar version
901bcb5a Update registry k8s.gcr.io -> registry.k8s.io

git-subtree-dir: release-tools
git-subtree-split: f8c8cc4c7414c11526f14649856ff8e6b8a4e67c
@xing-yang xing-yang mentioned this pull request Nov 27, 2023
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants