ci: fix non-root regression, don't clobber Bazel cache on each invoca…#1915
ci: fix non-root regression, don't clobber Bazel cache on each invoca…#1915mattklein123 merged 3 commits intoenvoyproxy:masterfrom
Conversation
…tion. Signed-off-by: Harvey Tuch <[email protected]>
|
This needs #1914 and the SHA update before merging. |
ci/build_setup.sh
Outdated
| if [[ -d /bazel-prebuilt-output ]]; then | ||
| if [[ -d /bazel-prebuilt-output && ! -d "${TEST_TMPDIR}/_bazel_${USER}" ]]; then | ||
| BAZEL_OUTPUT_BASE="$(bazel info output_base)" | ||
| rm -rf "${BAZEL_OUTPUT_BASE}" |
There was a problem hiding this comment.
Not sure exactly what's going wrong with the old code, but if you want to avoid clobbering a fresher cache then this rm -rf probably needs to change also.
There was a problem hiding this comment.
It was symlinking in some stuff from the build image that Bazel complained about not being able to timestamp (?). Seems cleaner just to copy it rather than symlink to stuff generated by root on a read-only image.
The rm -rf is OK, but probably redundant, as we now have a check above to see if the cache exists; if it does, we don't bother trying to copy over it. We can probably actually just remove this line completely.
|
LGTM |
| # If you edit the SHA here you must also edit the SHA in .circleci/config.yml. | ||
|
|
||
| ENVOY_BUILD_SHA=44d539cb572d04c81b62425373440c54934cf267 | ||
| ENVOY_BUILD_SHA=114e24c6fd05fc026492e9d2ca5608694e5ea59d |
There was a problem hiding this comment.
Oops, sorry, missed this. You need to update config.yml also. (See comment above). Do you mind doing a follow up? Just realized this when I merged master into my Lua branch.
There was a problem hiding this comment.
Whoops. We should have some CI check that validates consistency here, or have the consumers of envoy_build_sha.sh source from config.yml via sed/grep. Either works for me, let me know what you prefer, I'll put in a PR to do this.
There was a problem hiding this comment.
Yeah, agreed. I'm open to any solution. sed/grep from config.yml is probably fine, or just some small check script that runs and checks both locations?
Signed-off-by: Harvey Tuch <[email protected]>
Signed-off-by: Harvey Tuch <[email protected]>
Before:
$ bazel-bin/src/envoy/envoy --version
bazel-bin/src/envoy/envoy version: 0/1.8.0-dev//DEBUG
After:
$ bazel-bin/src/envoy/envoy --version
bazel-bin/src/envoy/envoy version: f315a32fc7c6f727fc9645cc1ca27d4160c1d0e0/1.8.0-dev/Clean/DEBUG
Fixes envoyproxy#1803.
Signed-off-by: Piotr Sikora <[email protected]>
This is now default in Bazel 4.1, and the flag is removed in Bazel 5.0. Signed-off-by: Brentley Jones <[email protected]> Signed-off-by: JP Simard <[email protected]>
This is now default in Bazel 4.1, and the flag is removed in Bazel 5.0. Signed-off-by: Brentley Jones <[email protected]> Signed-off-by: JP Simard <[email protected]>
…tion.
Signed-off-by: Harvey Tuch [email protected]