Skip to content

Commit

Permalink
[5.2.0] Update java_tools 11.7.1 (bazelbuild#15231)
Browse files Browse the repository at this point in the history
* Update java_tools v11.7.1

A new release was required because bazelbuild@0c65082 caused java_tools to be built targetting java11, inadvertently dropping support for jre8/9/10

Closes bazelbuild#15258.

PiperOrigin-RevId: 441834316

(cherry picked from commit 22c91da)

* Automatic code cleanup.

PiperOrigin-RevId: 414481809
(cherry picked from commit 1987af2)

* Automatic code cleanup.

PiperOrigin-RevId: 415349792

(cherry picked from commit ccc9b9d)

A clean cherry pick was not possible since the contents of various files in the change have diverged since this release branch was cut.
  • Loading branch information
hvadehra authored Apr 19, 2022
1 parent 2422cfb commit bbcff18
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 42 deletions.
32 changes: 16 additions & 16 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ DIST_DEPS = {
"remote_java_tools_test",
"remote_java_tools_for_testing",
],
"archive": "java_tools-v11.6.zip",
"sha256": "a7ac5922ee01e8b8fcb546ffc264ef314d0a0c679328b7fa4c432e5f54a86067",
"archive": "java_tools-v11.7.1.zip",
"sha256": "2eede49b2d80135e0ea22180f63df26db2ed4b795c1c041b25cc653d6019fbec",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools-v11.6.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools-v11.6.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools-v11.7.1.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools-v11.7.1.zip",
],
"used_in": [
"additional_distfiles",
Expand All @@ -299,11 +299,11 @@ DIST_DEPS = {
"remote_java_tools_test_linux",
"remote_java_tools_linux_for_testing",
],
"archive": "java_tools_linux-v11.6.zip",
"sha256": "15da4f84a7d39cd179acf3035d9def638eea6ba89a0ed8f4e8a8e6e1d6c8e328",
"archive": "java_tools_linux-v11.7.1.zip",
"sha256": "f78077f0c043d0d13c82de0ee4a99753e66bb18ec46e3601fa2a10e7f26798a8",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_linux-v11.6.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_linux-v11.6.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools_linux-v11.7.1.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools_linux-v11.7.1.zip",
],
"used_in": [
"additional_distfiles",
Expand All @@ -315,11 +315,11 @@ DIST_DEPS = {
"remote_java_tools_test_windows",
"remote_java_tools_windows_for_testing",
],
"archive": "java_tools_windows-v11.6.zip",
"sha256": "939f9d91f0df02851bbad8f5b1d26d24011329394cafe5668c1234e31ac2a1f7",
"archive": "java_tools_windows-v11.7.1.zip",
"sha256": "a7086734866505292ee4c206328c73c6af127e69bd51b98c9c186ae4b9b6d2db",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_windows-v11.6.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_windows-v11.6.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools_windows-v11.7.1.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools_windows-v11.7.1.zip",
],
"used_in": [
"additional_distfiles",
Expand All @@ -331,11 +331,11 @@ DIST_DEPS = {
"remote_java_tools_test_darwin",
"remote_java_tools_darwin_for_testing",
],
"archive": "java_tools_darwin-v11.6.zip",
"sha256": "f17ee54582b61f1ebd84c8fa2c54df796914cfbaac3cb821fb1286b55b080bc0",
"archive": "java_tools_darwin-v11.7.1.zip",
"sha256": "4d6d388b54ad3b9aa35b30dd67af8d71c4c240df8cfb5000bbec67bdd5c53a73",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_darwin-v11.6.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_darwin-v11.6.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools_darwin-v11.7.1.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools_darwin-v11.7.1.zip",
],
"used_in": [
"additional_distfiles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public AnalysisResult update(
"Analysis succeeded for only %d of %d top-level targets",
numSuccessful, numTargetsToAnalyze);
eventHandler.handle(Event.info(msg));
logger.atInfo().log(msg);
logger.atInfo().log("%s", msg);
}

AnalysisResult result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void reportError(
// Don't hide unchecked exceptions as part of the error reporting.
Throwables.throwIfUnchecked(exception);

logger.atSevere().withCause(exception).log(msg);
logger.atSevere().withCause(exception).log("%s", msg);
reportCommandLineError(commandLineReporter, exception);
moduleEnvironment.exit(createAbruptExitException(exception, msg, besCode));
}
Expand Down Expand Up @@ -254,7 +254,7 @@ private void waitForPreviousInvocation(boolean isShutdown) {
+ "Cancelling and starting a new invocation...",
waitedMillis / 1000, waitedMillis % 1000);
reporter.handle(Event.warn(msg));
logger.atWarning().withCause(exception).log(msg);
logger.atWarning().withCause(exception).log("%s", msg);
cancelCloseFutures = true;
} catch (ExecutionException e) {
String msg;
Expand All @@ -274,7 +274,7 @@ private void waitForPreviousInvocation(boolean isShutdown) {
e.getMessage());
}
reporter.handle(Event.warn(msg));
logger.atWarning().withCause(e).log(msg);
logger.atWarning().withCause(e).log("%s", msg);
cancelCloseFutures = true;
} finally {
if (cancelCloseFutures) {
Expand Down Expand Up @@ -671,7 +671,7 @@ private BuildEventServiceTransport createBesTransport(
String.format(
"Build Event Service uploads disabled due to a connectivity problem: %s", status);
reporter.handle(Event.warn(message));
logger.atWarning().log(message);
logger.atWarning().log("%s", message);
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ ListenableFuture<Void> getHalfCloseFuture() {

private DetailedExitCode logAndSetException(
String message, BuildProgress.Code bpCode, Throwable cause) {
logger.atSevere().log(message);
logger.atSevere().log("%s", message);
DetailedExitCode detailedExitCode =
DetailedExitCode.of(
FailureDetail.newBuilder()
Expand Down Expand Up @@ -490,15 +490,15 @@ private void publishBuildEvents()
String.format(
"Expected ACK with seqNum=%d but received ACK with seqNum=%d",
expected.getSequenceNumber(), actualSeqNum);
logger.atInfo().log(message);
logger.atInfo().log("%s", message);
streamContext.abortStream(Status.FAILED_PRECONDITION.withDescription(message));
}
} else {
String message =
String.format(
"Received ACK (seqNum=%d) when no ACK was expected",
ackEvent.getSequenceNumber());
logger.atInfo().log(message);
logger.atInfo().log("%s", message);
streamContext.abortStream(Status.FAILED_PRECONDITION.withDescription(message));
}
}
Expand Down Expand Up @@ -537,7 +537,7 @@ private void publishBuildEvents()
if (!shouldRetryStatus(streamStatus)) {
String message =
String.format("Not retrying publishBuildEvents: status='%s'", streamStatus);
logger.atInfo().log(message);
logger.atInfo().log("%s", message);
throw withFailureDetail(
streamStatus.asException(),
BuildProgress.Code.BES_STREAM_NOT_RETRYING_FAILURE,
Expand All @@ -548,7 +548,7 @@ private void publishBuildEvents()
String.format(
"Not retrying publishBuildEvents, no more attempts left: status='%s'",
streamStatus);
logger.atInfo().log(message);
logger.atInfo().log("%s", message);
throw withFailureDetail(
streamStatus.asException(),
BuildProgress.Code.BES_UPLOAD_RETRY_LIMIT_EXCEEDED_FAILURE,
Expand Down Expand Up @@ -636,7 +636,7 @@ private void publishLifecycleEvent(PublishLifecycleEventRequest request)
if (!shouldRetryStatus(e.getStatus())) {
String message =
String.format("Not retrying publishLifecycleEvent: status='%s'", e.getStatus());
logger.atInfo().log(message);
logger.atInfo().log("%s", message);
throw withFailureDetail(e, BuildProgress.Code.BES_STREAM_NOT_RETRYING_FAILURE, message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private void exitFailure(Throwable e) {
.build()),
e));
pendingWrites.clear();
logger.atSevere().withCause(e).log(message);
logger.atSevere().withCause(e).log("%s", message);
}

private static BuildProgress.Code getBuildProgressCode(Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ private static void logDeleteTreeFailure(
for (Path entry : entries) {
directoryDetails.append(" '").append(entry.getBaseName()).append("'");
}
logger.atWarning().log(directoryDetails.toString());
logger.atWarning().log("%s", directoryDetails);
} catch (IOException e) {
logger.atWarning().withCause(e).log("'%s' exists but could not be read", directory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private void stepLog(
Level level, @Nullable Throwable cause, @FormatString String fmt, Object... args) {
String msg = String.format(fmt, args);
String toLog = String.format("%s (#%d %s)", msg, id, desc());
logger.at(level).withCause(cause).log(toLog);
logger.at(level).withCause(cause).log("%s", toLog);
}

private String desc() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ synchronized void suspendCallback(int reason) {
String logString = event.logString();
reporter.handle(Event.info(logString));
reporter.post(event);
logger.atInfo().log(logString);
logger.atInfo().log("%s", logString);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ public void afterCommand() throws AbruptExitException {
failure = e;
failureCode = Code.RPC_LOG_FAILURE;
failureMessage = "Partially wrote rpc log file";
logger.atWarning().withCause(e).log(failureMessage);
logger.atWarning().withCause(e).log("%s", failureMessage);
}

executorService = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ DetailedExitCode parseStarlarkOptions(CommandEnvironment env, ExtendedEventHandl
StarlarkOptionsParser.newStarlarkOptionsParser(env, optionsParser).parse(eventHandler);
} catch (OptionsParsingException e) {
String logMessage = "Error parsing Starlark options";
logger.atInfo().withCause(e).log(logMessage);
logger.atInfo().withCause(e).log("%s", logMessage);
return processOptionsParsingException(
eventHandler, e, logMessage, Code.STARLARK_OPTIONS_PARSE_FAILURE);
}
Expand Down Expand Up @@ -343,7 +343,7 @@ DetailedExitCode parseOptions(List<String> args, ExtendedEventHandler eventHandl
}
} catch (OptionsParsingException e) {
String logMessage = "Error parsing options";
logger.atInfo().withCause(e).log(logMessage);
logger.atInfo().withCause(e).log("%s", logMessage);
return processOptionsParsingException(
eventHandler, e, logMessage, Code.OPTIONS_PARSE_FAILURE);
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ private static int batchMain(Iterable<BlazeModule> modules, String[] args) {

try {
logger.atInfo().log(
SafeRequestLogging.getRequestLogString(commandLineOptions.getOtherArgs()));
"%s", SafeRequestLogging.getRequestLogString(commandLineOptions.getOtherArgs()));
BlazeCommandResult result =
dispatcher.exec(
policy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void buildComplete(BuildCompleteEvent event) {
event.getResult().getBuildToolLogCollection()
.addDirectValue(
"critical path", criticalPath.toString().getBytes(StandardCharsets.UTF_8));
logger.atInfo().log(criticalPath.toString());
logger.atInfo().log("%s", criticalPath);
logger.atInfo().log(
"Slowest actions:\n %s",
Joiner.on("\n ").join(criticalPathComputer.getSlowestComponents()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ private void executeCommand(RunRequest request, BlockingStreamObserver<RunRespon
.collect(ImmutableList.toImmutableList());

InvocationPolicy policy = InvocationPolicyParser.parsePolicy(request.getInvocationPolicy());
logger.atInfo().log(SafeRequestLogging.getRequestLogString(args));
logger.atInfo().log("%s", SafeRequestLogging.getRequestLogString(args));
result =
dispatcher.exec(
policy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ private static void printStack(IOException e) {
printErr.println("=======[BAZEL SERVER: ENCOUNTERED IO EXCEPTION]=======");
e.printStackTrace(printErr);
printErr.println("=====================================================");
logger.atSevere().log(err.toString());
logger.atSevere().log("%s", err);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public int available() {
}

private static void processInput(InputStream stdinInput, Subprocess process) {
logger.atFiner().log(stdinInput.toString());
logger.atFiner().log("%s", stdinInput);
try (OutputStream out = process.getOutputStream()) {
ByteStreams.copy(stdinInput, out);
} catch (IOException ioe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ private static void logDiffInfo(
}
}

logger.atInfo().log(result.toString());
logger.atInfo().log("%s", result);
}

private static int getNumberOfModifiedFiles(Iterable<SkyKey> modifiedValues) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static final class VacuousSuccess extends Statement {

@Override
public void evaluate() throws Throwable {
logger.atWarning().log(reason);
logger.atWarning().log("%s", reason);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ private ActionResult execute(
String.format(
"Command:\n%s\nexceeded deadline of %f seconds.",
Arrays.toString(command.getArgumentsList().toArray()), timeoutMillis / 1000.0);
logger.atWarning().log(errMessage);
logger.atWarning().log("%s", errMessage);
errStatus =
Status.newBuilder()
.setCode(Code.DEADLINE_EXCEEDED.getNumber())
Expand Down

0 comments on commit bbcff18

Please sign in to comment.