From be8d5e9710eea38b53dbd3f2f340ec219ecf0b79 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Tue, 9 Apr 2019 01:03:51 -0700 Subject: [PATCH] add some logging hacks --- .../jvm/tasks/jvm_compile/zinc/zinc_compile.py | 7 +++++-- src/rust/engine/Cargo.lock | 18 +++++++++--------- src/rust/engine/fs/Cargo.toml | 2 +- src/rust/engine/fs/src/store.rs | 7 ++++++- src/rust/engine/process_execution/Cargo.toml | 2 +- .../process_execution/bazel_protos/Cargo.toml | 2 +- .../engine/process_execution/src/remote.rs | 2 +- src/rust/engine/testutil/mock/Cargo.toml | 2 +- 8 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py b/src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py index 22e266001b1e..f922dde5a6c1 100644 --- a/src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py +++ b/src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py @@ -214,7 +214,8 @@ def __init__(self, *args, **kwargs): # hermetically https://github.com/pantsbuild/pants/issues/6517 if self.get_options().incremental: raise TaskError("Hermetic zinc execution does not currently support incremental compiles. " - "Please use --no-compile-zinc-incremental.") + "Please use --no-{}-incremental." + .format(self.get_options_scope_equivalent_flag_component())) try: fast_relpath(self.get_options().pants_workdir, get_buildroot()) except ValueError: @@ -230,7 +231,9 @@ def __init__(self, *args, **kwargs): # TODO: Make this work by capturing the correct Digest and passing them around the # right places. # See https://github.com/pantsbuild/pants/issues/6432 - raise TaskError("Hermetic zinc execution currently doesn't work with classpath jars") + raise TaskError("Hermetic zinc execution currently doesn't work with classpath jars. " + "Please no --no-{}-use-classpath-jars." + .format(self.get_options_scope_equivalent_flag_component())) def select(self, target): raise NotImplementedError() diff --git a/src/rust/engine/Cargo.lock b/src/rust/engine/Cargo.lock index bc0feffec5d6..c127e86c94d9 100644 --- a/src/rust/engine/Cargo.lock +++ b/src/rust/engine/Cargo.lock @@ -101,7 +101,7 @@ dependencies = [ "build_utils 0.0.1", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.3.0 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)", + "grpcio 0.3.0 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)", "grpcio-compiler 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashing 0.0.1", "prost 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -517,7 +517,7 @@ dependencies = [ "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures-timer 0.1.1 (git+https://github.com/pantsbuild/futures-timer?rev=0b747e565309a58537807ab43c674d8951f9e5a0)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.3.0 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)", + "grpcio 0.3.0 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)", "hashing 0.0.1", "ignore 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -658,10 +658,10 @@ dependencies = [ [[package]] name = "grpcio" version = "0.3.0" -source = "git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0#4dfafe9355dc996d7d0702e7386a6fedcd9734c0" +source = "git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431#76f03206c4da7f02c67ef381ce2007e27865e431" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio-sys 0.2.3 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)", + "grpcio-sys 0.2.3 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)", "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -679,7 +679,7 @@ dependencies = [ [[package]] name = "grpcio-sys" version = "0.2.3" -source = "git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0#4dfafe9355dc996d7d0702e7386a6fedcd9734c0" +source = "git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431#76f03206c4da7f02c67ef381ce2007e27865e431" dependencies = [ "cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1075,7 +1075,7 @@ dependencies = [ "bazel_protos 0.0.1", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "grpcio 0.3.0 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)", + "grpcio 0.3.0 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)", "hashing 0.0.1", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1267,7 +1267,7 @@ dependencies = [ "fs 0.0.1", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-timer 0.1.1 (git+https://github.com/pantsbuild/futures-timer?rev=0b747e565309a58537807ab43c674d8951f9e5a0)", - "grpcio 0.3.0 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)", + "grpcio 0.3.0 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)", "hashing 0.0.1", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mock 0.0.1", @@ -2607,9 +2607,9 @@ dependencies = [ "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" -"checksum grpcio 0.3.0 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)" = "" +"checksum grpcio 0.3.0 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)" = "" "checksum grpcio-compiler 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a63ccc27b0099347d2bea2c3d0f1c79c018a13cfd08b814a1992e341b645d5e1" -"checksum grpcio-sys 0.2.3 (git+https://github.com/pantsbuild/grpc-rs.git?rev=4dfafe9355dc996d7d0702e7386a6fedcd9734c0)" = "" +"checksum grpcio-sys 0.2.3 (git+https://github.com/cosmicexplorer/grpc-rs.git?rev=76f03206c4da7f02c67ef381ce2007e27865e431)" = "" "checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" diff --git a/src/rust/engine/fs/Cargo.toml b/src/rust/engine/fs/Cargo.toml index 1c1c800833d2..d3470a97603c 100644 --- a/src/rust/engine/fs/Cargo.toml +++ b/src/rust/engine/fs/Cargo.toml @@ -16,7 +16,7 @@ futures-cpupool = "0.1" # TODO: Switch to a release once https://github.com/alexcrichton/futures-timer/pull/11 and https://github.com/alexcrichton/futures-timer/pull/12 merge futures-timer = { git = "https://github.com/pantsbuild/futures-timer", rev = "0b747e565309a58537807ab43c674d8951f9e5a0" } glob = "0.2.11" -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "4dfafe9355dc996d7d0702e7386a6fedcd9734c0", default_features = false, features = ["protobuf-codec", "secure"] } +grpcio = { git = "https://github.com/cosmicexplorer/grpc-rs.git", rev = "76f03206c4da7f02c67ef381ce2007e27865e431", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../hashing" } ignore = "0.4.4" indexmap = "1.0.2" diff --git a/src/rust/engine/fs/src/store.rs b/src/rust/engine/fs/src/store.rs index d49d318ab361..e13604444af2 100644 --- a/src/rust/engine/fs/src/store.rs +++ b/src/rust/engine/fs/src/store.rs @@ -1999,7 +1999,12 @@ mod remote { // TODO: This may be a race condition that deserves respect, but right now it's // not clear it's an error. See #6344 for a case where we override this behavior // by forking gprcio. - grpcio::Error::RpcFinished(None) => Ok(None), + grpcio::Error::RpcFinished(None) + if std::env::var("_ALLOW_RPCFINISHED").unwrap_or("NO".to_string()) + == "YES".to_string() => + { + Ok(None) + } _ => Err(format!( "Error from server in response to CAS read request: {:?}", e diff --git a/src/rust/engine/process_execution/Cargo.toml b/src/rust/engine/process_execution/Cargo.toml index 1a6361205a33..c87ec9af636b 100644 --- a/src/rust/engine/process_execution/Cargo.toml +++ b/src/rust/engine/process_execution/Cargo.toml @@ -13,7 +13,7 @@ bytes = "0.4.5" digest = "0.8" fs = { path = "../fs" } futures = "^0.1.16" -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "4dfafe9355dc996d7d0702e7386a6fedcd9734c0", default_features = false, features = ["protobuf-codec", "secure"] } +grpcio = { git = "https://github.com/cosmicexplorer/grpc-rs.git", rev = "76f03206c4da7f02c67ef381ce2007e27865e431", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../hashing" } log = "0.4" protobuf = { version = "2.0.4", features = ["with-bytes"] } diff --git a/src/rust/engine/process_execution/bazel_protos/Cargo.toml b/src/rust/engine/process_execution/bazel_protos/Cargo.toml index 760e9d356fd1..08b108b7219c 100644 --- a/src/rust/engine/process_execution/bazel_protos/Cargo.toml +++ b/src/rust/engine/process_execution/bazel_protos/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] bytes = "0.4.5" futures = "^0.1.16" -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "4dfafe9355dc996d7d0702e7386a6fedcd9734c0", default_features = false, features = ["protobuf-codec", "secure"] } +grpcio = { git = "https://github.com/cosmicexplorer/grpc-rs.git", rev = "76f03206c4da7f02c67ef381ce2007e27865e431", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../../hashing" } prost = "0.4" prost-derive = "0.4" diff --git a/src/rust/engine/process_execution/src/remote.rs b/src/rust/engine/process_execution/src/remote.rs index 042fdf5f28b3..cc6d6eac9314 100644 --- a/src/rust/engine/process_execution/src/remote.rs +++ b/src/rust/engine/process_execution/src/remote.rs @@ -279,7 +279,7 @@ impl super::CommandRunner for CommandRunner { attempts += &format!("\nAttempt {}: {:?}", i, attempt); } debug!( - "Finished remote exceution of {} after {} attempts: Stats: {}", + "Finished remote execution of {} after {} attempts: Stats: {}", description2, resp.execution_attempts.len(), attempts diff --git a/src/rust/engine/testutil/mock/Cargo.toml b/src/rust/engine/testutil/mock/Cargo.toml index b52a9f2ff1d3..c72dcf38c9e8 100644 --- a/src/rust/engine/testutil/mock/Cargo.toml +++ b/src/rust/engine/testutil/mock/Cargo.toml @@ -9,7 +9,7 @@ publish = false bazel_protos = { path = "../../process_execution/bazel_protos" } bytes = "0.4.5" futures = "^0.1.16" -grpcio = { git = "https://github.com/pantsbuild/grpc-rs.git", rev = "4dfafe9355dc996d7d0702e7386a6fedcd9734c0", default_features = false, features = ["protobuf-codec", "secure"] } +grpcio = { git = "https://github.com/cosmicexplorer/grpc-rs.git", rev = "76f03206c4da7f02c67ef381ce2007e27865e431", default_features = false, features = ["protobuf-codec", "secure"] } hashing = { path = "../../hashing" } parking_lot = "0.6" protobuf = { version = "2.0.4", features = ["with-bytes"] }