Skip to content

Commit

Permalink
[Bazel][Log] Fix Worker Spawn Runner not showing error message output…
Browse files Browse the repository at this point in the history
… issue

**Background**
https://jira.sc-corp.net/browse/APP-60122
More details see upstream ticket: bazelbuild#11948

This issue is a regression from Bazel 3.1.0+. This PR is a temp work around.
---
Automatic squash commit from https://github.sc-corp.net/Snapchat/bazel/pull/63
Cooled by jchen
  • Loading branch information
jchen-sc committed Aug 14, 2020
1 parent d779180 commit 3f9acf5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
18 changes: 9 additions & 9 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ distdir_tar(
"1.25.0.zip",
# rules_nodejs
"rules_nodejs-1.3.0.tar.gz",
"android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz",
"android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz",
# bazelbuild/platforms
Expand Down Expand Up @@ -193,7 +193,7 @@ distdir_tar(
"1.25.0.zip": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
# rules_nodejs
"rules_nodejs-1.3.0.tar.gz": "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37",
"android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz": "7b9ced735667a9ad94693b7046640b7264521d4f613622072b8767fc4f48b887",
"android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz": "5cdf643e47536b4a3f023d8ee68717213106ecf9e00e6777f65186ef0e960fac",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96",
# bazelbuild/platforms
Expand Down Expand Up @@ -246,8 +246,8 @@ distdir_tar(
"https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz",
"https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz",
],
"android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz",
"android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz",
],
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": [
Expand Down Expand Up @@ -525,7 +525,7 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip",
"android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz",
"android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz",
# bazelbuild/platforms
Expand Down Expand Up @@ -555,7 +555,7 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
"android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz": "7b9ced735667a9ad94693b7046640b7264521d4f613622072b8767fc4f48b887",
"android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz": "5cdf643e47536b4a3f023d8ee68717213106ecf9e00e6777f65186ef0e960fac",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96",
# bazelbuild/platforms
Expand Down Expand Up @@ -584,8 +584,8 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
"android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz",
"android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz",
],
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": [
Expand Down Expand Up @@ -707,7 +707,7 @@ http_archive(
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "7b9ced735667a9ad94693b7046640b7264521d4f613622072b8767fc4f48b887", # ANDROID_TOOLS_UPDATE_MARKER_DO_NOT_REMOVE
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz",
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz",
)

# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/coverage.WORKSPACE.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "android_tools",
sha256 = "7b9ced735667a9ad94693b7046640b7264521d4f613622072b8767fc4f48b887",
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.2.tar.gz",
sha256 = "5cdf643e47536b4a3f023d8ee68717213106ecf9e00e6777f65186ef0e960fac",
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc1-snap-0.4.tar.gz",
auth_patterns = {
"storage.googleapis.com": "Bearer <password>",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ private static int runPersistentWorker() throws Exception {
PrintStream realStdErr = System.err;
try {
// Redirect all stdout and stderr output for logging.
System.setOut(ps);
System.setErr(ps);
// Avoid changing std stream due to https://jira.sc-corp.net/browse/APP-60122
// System.setOut(ps);
// System.setErr(ps);

while (true) {
try {
Expand Down
2 changes: 1 addition & 1 deletion tools/android/runtime_deps/upload_android_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
set -euo pipefail

# The version of android_tools.tar.gz
VERSION="0.19.0rc1-snap-0.2"
VERSION="0.19.0rc1-snap-0.4"
VERSIONED_FILENAME="android_tools_pkg-$VERSION.tar.gz"

# Create a temp directory to hold the versioned tarball, and clean it up when the script exits.
Expand Down

0 comments on commit 3f9acf5

Please sign in to comment.