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

Use git grep as opposed to system grep #7245

Merged
merged 1 commit into from
Jun 12, 2019

Conversation

Reflejo
Copy link
Contributor

@Reflejo Reflejo commented Jun 12, 2019

When running on a system where BSD grep is on the PATH the check fails because bsd-grep follows symlinks on grep -r. This causes the check to find all the transitive dependencies that are using git on the bazel-envoy symbolic link directory.

Note this is also a better option because we only care about greping the files that are included in the repo and nothing else

Risk Level: Low
Testing: Done locally, added a bzl file with remote = strings and it correctly failed.

rebello95
rebello95 previously approved these changes Jun 12, 2019
When running on a system where BSD grep is on the PATH the check fails
because bsd-grep follows symlinks on `grep -r`. This causes the check
to find all the transitive dependencies that are using git on the
`bazel-envoy` symbolic link directory

Signed-off-by: Martin Conte Mac Donell <martin@lyft.com>
@lizan lizan self-assigned this Jun 12, 2019
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks a ton for looking into this. I'm still a little confused as to why this doesn't effect upstream users running on OSX, but I will try to not think about it too hard. :)

@mattklein123 mattklein123 merged commit db853fd into envoyproxy:master Jun 12, 2019
@Reflejo
Copy link
Contributor Author

Reflejo commented Jun 12, 2019

@mattklein123 just for your mental sanity: this -does- happen upstream on osx environments that don’t have gnu-grep first on the PATH. I repro’ed with a fresh clone

@mattklein123
Copy link
Member

@Reflejo I see. Is it something about the mobile dev environment that switches this?

@Reflejo
Copy link
Contributor Author

Reflejo commented Jun 12, 2019

@mattklein123 No, bsd grep is just the default on vanilla macos environments (aka any macos that didn't brew install grep nor added /usr/local/opt/grep/libexec/gnubin to the PATH before /usr/bin).

I assume most devs compiling envoy have gnu utils though and the ones that don't are just passing --no-verify

rebello95 added a commit to envoyproxy/envoy-mobile that referenced this pull request Jun 12, 2019
Updating to include envoyproxy/envoy#7245.

Signed-off-by: Michael Rebello <mrebello@lyft.com>
rebello95 added a commit to envoyproxy/envoy-mobile that referenced this pull request Jun 12, 2019
Updating to include envoyproxy/envoy#7245.

Signed-off-by: Michael Rebello <mrebello@lyft.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Updating to include #7245.

Signed-off-by: Michael Rebello <mrebello@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Updating to include #7245.

Signed-off-by: Michael Rebello <mrebello@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants