From 1160485192b5e6d95bcd426b55cc9a35fc6b8614 Mon Sep 17 00:00:00 2001 From: Yannic Bonenberger Date: Thu, 30 Dec 2021 10:00:26 -0800 Subject: [PATCH] Rename --project_id to --bes_instance_name 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 acfe25f733e057..92b215e3e36281 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",