Skip to content

Commit 1160485

Browse files
Yanniccopybara-github
authored andcommitted
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 bazelbuild#14455. PiperOrigin-RevId: 418972581
1 parent a731acd commit 1160485

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ private BuildEventServiceTransport createBesTransport(
692692
new BuildEventServiceProtoUtil.Builder()
693693
.buildRequestId(buildRequestId)
694694
.invocationId(invocationId)
695-
.projectId(besOptions.projectId)
695+
.projectId(besOptions.instanceName)
696696
.commandName(cmdEnv.getCommandName())
697697
.keywords(getBesKeywords(besOptions, cmdEnv.getRuntime().getStartupOptionsProvider()))
698698
.build();

src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ public class BuildEventServiceOptions extends OptionsBase {
8888
public boolean besLifecycleEvents;
8989

9090
@Option(
91-
name = "project_id",
92-
defaultValue = "null",
93-
documentationCategory = OptionDocumentationCategory.LOGGING,
94-
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
95-
help = "Specifies the BES project identifier. Defaults to null."
96-
)
97-
public String projectId;
91+
name = "bes_instance_name",
92+
oldName = "project_id",
93+
defaultValue = "null",
94+
documentationCategory = OptionDocumentationCategory.LOGGING,
95+
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
96+
help =
97+
"Specifies the instance name under which the BES will persist uploaded BEP. Defaults "
98+
+ "to null.")
99+
public String instanceName;
98100

99101
@Option(
100102
name = "bes_keywords",

0 commit comments

Comments
 (0)