Skip to content

Use git grep as opposed to system grep#7245

Merged
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
Reflejo:fz-nongnu-grep
Jun 12, 2019
Merged

Use git grep as opposed to system grep#7245
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
Reflejo:fz-nongnu-grep

Conversation

@Reflejo
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@Reflejo
Copy link
Copy Markdown
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