proto_format: Prebuild formatted api for proto_sync#21769
proto_format: Prebuild formatted api for proto_sync#21769phlax merged 1 commit intoenvoyproxy:mainfrom
proto_sync#21769Conversation
|
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to |
4600cbb to
5032ede
Compare
|
~this seems to work pretty reliably in CI breaking/fixing protos and testng ~ ~it
(approach changed as described below) |
0782a8e to
582b419
Compare
proto_sync
proto_syncproto_sync
|
i tested this out further and realized that only the "ideal" representation of api fs can be prebuilt - the "actual" needs to use what is currently on the fs so cannot be hermetic prebuilding only the ideal api (ie the one built from what bazel can see) speeds this up a lot in almost every situation (uncached run having the least benefit, and may be slower) i have also taken this a step further and switched the protoprint jobs that are currently run in a python multiproc pool inside proto_sync.py to use an aspect (#21750) this seems to speed things up quite a bit - altho in the uncached run it is doing a bit more work as it currently only protoprints changed files, whereas this lets bazel manage it, meaning it has to check all the first time
cc @htuch |
after testing this further this seems to be an issue with my impiementation so will debug further - i have for that reason split out the part shifting (^^ fixed but kept in separate PR as there are quite a few changes required to use an aspect) |
proto_syncproto_sync
tools/proto_format/BUILD
Outdated
There was a problem hiding this comment.
this is pretty annoying - it used to be that to create a pkg_tar and preserve dir structure you just gave it srcs - now to do this you must have 2 rules and this weird strip_prefix invokation
fc33f82 to
e035dae
Compare
Signed-off-by: Ryan Northey <ryan@synca.io>
|
/retest |
|
Retrying Azure Pipelines: |
|
@phlax would you mind updating the PR description with details about what this change does? Thank you. /wait-any |
|
done |
Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: Amila Senadheera <amila.15@cse.mrt.ac.lk>
Commit Message:
Additional Description:
Currently
proto_synccompares 2 "api" directories:in the case of the former this can be built hermetically and benefit from bazels caching (and potentially incremental builds)
this PR makes the creation of the "formatted api directory" hermetic and separates it from the run job in which the directories are compared
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]