Automated rollback of commit 526ec17843b931d41e7d7ff9a8d68d6c90bce1ec.

*** Reason for rollback ***

b/119190539

*** Original change description ***

Add a new BEP event for the location of output from the `query`, `cquery`, and `aquery` commands. Add a new common query flag --upload_query_output_using_bep that controls whether these commands print their output to the console or whether they upload them to remote storage using BEP.

RELNOTES: The new --upload_query_output_using_bep query/cquery/aquery flag causes query outputs to be uploaded via BEP.
PiperOrigin-RevId: 220530561
diff --git a/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java
index 5be6a7a..256041e 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java
@@ -96,7 +96,6 @@
   private final String parserPrefix;
   private final PathPackageLocator pkgPath;
   private final Supplier<WalkableGraph> walkableGraphSupplier;
-  private final CommonQueryOptions commonQueryOptions;
   protected WalkableGraph graph;
 
   private static final Function<SkyKey, ConfiguredTargetKey> SKYKEY_TO_CTKEY =
@@ -127,15 +126,13 @@
       String parserPrefix,
       PathPackageLocator pkgPath,
       Supplier<WalkableGraph> walkableGraphSupplier,
-      Set<Setting> settings,
-      CommonQueryOptions commonQueryOptions) {
+      Set<Setting> settings) {
     super(keepGoing, true, Rule.ALL_LABELS, eventHandler, settings, extraFunctions);
     this.topLevelConfigurations = topLevelConfigurations;
     this.hostConfiguration = hostConfiguration;
     this.parserPrefix = parserPrefix;
     this.pkgPath = pkgPath;
     this.walkableGraphSupplier = walkableGraphSupplier;
-    this.commonQueryOptions = commonQueryOptions;
   }
 
   public abstract ImmutableList<NamedThreadSafeOutputFormatterCallback<T>>
@@ -192,10 +189,6 @@
     return hostConfiguration;
   }
 
-  public CommonQueryOptions getCommonQueryOptions() {
-    return commonQueryOptions;
-  }
-
   // TODO(bazel-team): It's weird that this untemplated function exists. Fix? Or don't implement?
   @Override
   public Target getTarget(Label label) throws TargetNotFoundException, InterruptedException {