From 2b48c6b9a447756fcb3295b8a75899b96efa7fd4 Mon Sep 17 00:00:00 2001 From: Yannic Date: Tue, 4 Jan 2022 13:21:07 +0100 Subject: [PATCH] Rename --project_id to --bes_instance_name (#14507) This makes it clearer that this flag affects the BES and not, e.g., remote cache or execution. `--bes_instance_name` was chosen to match `--remote_instance_name` as closely as possible. `--project_id` always seemed very Google/GCP centric, and now that there are multiple other BES implementations like BuildBuddy or EngFlow Build and Test UI, it makes sense to change the terminology to follow the conventions from the REAPI. We will keep `--project_id` as an alias for the foreseable future. Closes #14455. PiperOrigin-RevId: 418972581 --- .../BuildEventServiceModule.java | 2 +- .../BuildEventServiceOptions.java | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java index 58162185d7e6de..463551c9de19a6 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java @@ -692,7 +692,7 @@ private BuildEventServiceTransport createBesTransport( new BuildEventServiceProtoUtil.Builder() .buildRequestId(buildRequestId) .invocationId(invocationId) - .projectId(besOptions.projectId) + .projectId(besOptions.instanceName) .commandName(cmdEnv.getCommandName()) .keywords(getBesKeywords(besOptions, cmdEnv.getRuntime().getStartupOptionsProvider())) .build(); diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java index 022309152426f1..b8bbeb9969919c 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java @@ -88,13 +88,15 @@ public class BuildEventServiceOptions extends OptionsBase { public boolean besLifecycleEvents; @Option( - name = "project_id", - defaultValue = "null", - documentationCategory = OptionDocumentationCategory.LOGGING, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, - help = "Specifies the BES project identifier. Defaults to null." - ) - public String projectId; + name = "bes_instance_name", + oldName = "project_id", + defaultValue = "null", + documentationCategory = OptionDocumentationCategory.LOGGING, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, + help = + "Specifies the instance name under which the BES will persist uploaded BEP. Defaults " + + "to null.") + public String instanceName; @Option( name = "bes_keywords",