Skip to content

Conversation

htuch
Copy link
Member

@htuch htuch commented Oct 20, 2017

…tion.

Signed-off-by: Harvey Tuch htuch@google.com

…tion.

Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch
Copy link
Member Author

htuch commented Oct 20, 2017

This needs #1914 and the SHA update before merging.

@jmillikin-stripe @PiotrSikora @mattklein123


# Replace the existing Bazel output cache with a copy of the image's prebuilt deps.
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}"
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

@jmillikin-stripe
Copy link
Contributor

LGTM

mattklein123
mattklein123 previously approved these changes Oct 20, 2017
@mattklein123 mattklein123 merged commit 16eb2c3 into envoyproxy:master Oct 21, 2017
@@ -1,3 +1,3 @@
# If you edit the SHA here you must also edit the SHA in .circleci/config.yml.

ENVOY_BUILD_SHA=44d539cb572d04c81b62425373440c54934cf267
ENVOY_BUILD_SHA=114e24c6fd05fc026492e9d2ca5608694e5ea59d
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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?

htuch added a commit that referenced this pull request Oct 21, 2017
Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch htuch deleted the fix-bazel-cache branch October 21, 2017 23:10
mattklein123 pushed a commit that referenced this pull request Oct 22, 2017
Signed-off-by: Harvey Tuch <htuch@google.com>
rshriram pushed a commit to rshriram/envoy that referenced this pull request Oct 30, 2018
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 <piotrsikora@google.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
This is now default in Bazel 4.1, and the flag is removed in Bazel 5.0.

Signed-off-by: Brentley Jones <brentleyjones@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
This is now default in Bazel 4.1, and the flag is removed in Bazel 5.0.

Signed-off-by: Brentley Jones <brentleyjones@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.

3 participants