Skip to content

Commit

Permalink
Implement --remote_force_print_messages
Browse files Browse the repository at this point in the history
Adds a flag for always printing messages returned by remotely executed
actions.
  • Loading branch information
exoson committed May 24, 2022
1 parent 97fa612 commit 86de593
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)

FileOutErr outErr = context.getFileOutErr();
String message = result.getMessage();
if (!result.success() && !message.isEmpty()) {
if ((!result.success() || remoteOptions.remoteForcePrintMessages) && !message.isEmpty()) {
outErr.printErr(message + "\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,17 @@ public RemoteOutputsStrategyConverter() {
help = "Maximum number of open files allowed during BEP artifact upload.")
public int maximumOpenFiles;

@Option(
name = "remote_force_print_messages",
defaultValue = "false",
category = "remote",
documentationCategory = OptionDocumentationCategory.LOGGING,
effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
help =
"If set to true, Bazel will always print messages returned by remotely executed actions. "
+ "By default these messages are only printed for failing actions.")
public boolean remoteForcePrintMessages;

// The below options are not configurable by users, only tests.
// This is part of the effort to reduce the overall number of flags.

Expand Down

0 comments on commit 86de593

Please sign in to comment.