-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
tools: setup build in local_fix_format #27060
Conversation
Signed-off-by: ohadvano <[email protected]>
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.
Co-authored-by: phlax <[email protected]> Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
I'm not sure what this change does but the whole point of naming this local_fix_format was to use the local tools installed on your OS rather than using Docker. To do this of course you need the right version of clang installed. |
it also has the benefit of being usable inside the container to only run this script, which was what @ohadvano wanted to do i think with the |
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.
lgtm, thanks @ohadvano
@jmarantz ill leave it to you to approve but i think this change is a good idea |
@jmarantz, I am running this locally, only I'm running this using docker (through
Although I'm pretty sure I have clang installed (otherwise couldn't have built envoy), tried exporting these env vars and it didn't help. Anyways, to your question - I do intend on running this locally. |
Can you try to set these environment variables and run directly?
You'l obviously have to set them correctly for your envirnment. It might be that if your dev env is Windows based you really need Docker. I hadn't tested that. Another option is for you to run that setup script from a wrapper script customized for your environment. The 4 lines above are for my custom wrapper script. |
Thanks @jmarantz but it didn't work out for me. I assume that if I dig enough into trying to figure this out, I'll find how to make it work without the docker script, but I just thought that it doesn't worth my time if I can use the |
Sure; the point I was making is that you could have a script you use to run this one inside docker. This script might simply be:
rather than adding the special-case into the script you could just put that into your personal wrapper script. This is what I do to set up my environment to specify where to find the binaries. |
the reason for doing it this way is to avoid adding more scripts or other ci targets i think the suggested change doesnt affect current use in any way, and makes the most sense in terms of making this script versatile - |
I wasn't suggesting adding a new script to the repo. I was suggesting that the repo should contain the curated basic scripts that can be used compose a solution specific to a user, which is how I use local_fix_format.sh; there's nothing particular to my setup in there; I have that in a personal script as it contains the exact location of where I installed the right version of clang etc. I'm OK with checking this in as is though. If we were to put every possible setup in there with if-statements it would start to get unwieldy and hard to reason about, which is why I'm putting up mild resistance to this direction :) Does this make sense? |
@jmarantz, although this issue hasn't been posted by other devs, I assume that the outcome would be the same for anyone trying this use case (running this through Docker). It could be useful not only for me, so I don't consider this as a solution for a specific user.. |
That's valid except the premise of what I was trying to do with this script was to run without docker. Maybe at least you could drop some comments that you were unable to do this and it may be needed in the case of Windows? |
Signed-off-by: ohadvano <[email protected]>
@jmarantz of course. Added a comment. |
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
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.
Looking better. Now that it's a complete solution it's 11 lines including comments, you could argue it deserves to be its own independent script.
But I'm OK with this once we fix these nits.
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
Signed-off-by: ohadvano <[email protected]>
/retest |
Retrying Azure Pipelines: |
Signed-off-by: ohadvano <[email protected]>
@jmarantz I added a link to 'about WSL' in the comment |
Signed-off-by: ohadvano <[email protected]>
/retest |
Retrying Azure Pipelines: |
* main: (175 commits) xds: add config for pick_first LB policy extension (envoyproxy#26952) ci: run Kotlin tests with signal_trace disabled (envoyproxy#27090) ssl: upgrade FIPS boringssl version (envoyproxy#27087) Add createPath to Filesystem abstraction. (envoyproxy#27052) mobile/ci: Increase test_timeout for ios tests (envoyproxy#27044) [mobile]remove Java and GMScore impl from Cronvoy (envoyproxy#27039) Fix compliance issues for iOS builds (envoyproxy#27027) docs: fix the license URL of the dependency "dd-trace-cpp" (envoyproxy#27054) ci/mobile: Hide CI progress in .bazelrc (envoyproxy#27045) thrift_proxy: add access log support for local reply (envoyproxy#27057) ci: Consolidate artifact targets (envoyproxy#27079) lb: moving maglev to extensions (envoyproxy#27037) Overload Manager: LoadShedPoint for HCM decode headers (envoyproxy#26769) Plumb ServerFactoryContext into header validator factory (envoyproxy#27008) access_log: use AccessLogType::NotSet instead of default value (envoyproxy#27058) access_log: pass access log type parameter to evaluate function (envoyproxy#27063) Remove unused member from GrpcStream (envoyproxy#27055) tools: setup build in local_fix_format (envoyproxy#27060) generic proxy: virtual host support for the generic proxy routing (envoyproxy#26932) deps: Bump pytooling publishing deps (envoyproxy#27059) ...
Signed-off-by: ohadvano <[email protected]> Co-authored-by: phlax <[email protected]> Signed-off-by: Ryan Eskin <[email protected]>
Commit Message: tools: setup build in local_fix_format
Additional Description: I am trying to reduce the time it takes to check and fix only the code format, without further check such as examples and docs. The problem I'm facing is that when running
./ci/run_envoy_docker.sh './tools/local_fix_format.sh -all'
, clang is not configured. Callinglocal_fix_format.sh
is an alternative to add another target in do_ci.sh, as suggested by @phlax.Release Notes: None
Platform Specific Features: None