Skip to content

Commit 67e22e7

Browse files
aoeuicopybara-github
authored andcommitted
Add experimental_managed_storage_service_table_name flag.
Updates the RemoteAnalysisCachingServicesSupplier.configure method signature to include the buildId. PiperOrigin-RevId: 792180638 Change-Id: I9bf023911c237d6c9bd936297789edbee155ad7a
1 parent 03b0045 commit 67e22e7

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,9 @@ private RemoteAnalysisCachingDependenciesProviderImpl(
13291329
this.snapshot.orElse(new LongVersionClientId(this.evaluatingVersion.getVal()));
13301330
listener.setClientId(clientId);
13311331
servicesSupplier.configure(
1332-
env.getOptions().getOptions(RemoteAnalysisCachingOptions.class), clientId);
1332+
env.getOptions().getOptions(RemoteAnalysisCachingOptions.class),
1333+
clientId,
1334+
env.getBuildRequestId());
13331335
this.fingerprintValueServiceFuture = servicesSupplier.getFingerprintValueService();
13341336
this.analysisCacheClient = servicesSupplier.getAnalysisCacheClient();
13351337
this.eventHandler = env.getReporter();

src/main/java/com/google/devtools/build/lib/skyframe/serialization/FingerprintValueService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,9 @@ int fingerprintLength() {
152152
public Executor getExecutor() {
153153
return executor;
154154
}
155+
156+
@VisibleForTesting
157+
public FingerprintValueStore getStoreForTesting() {
158+
return store;
159+
}
155160
}

src/main/java/com/google/devtools/build/lib/skyframe/serialization/analysis/RemoteAnalysisCachingOptions.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ public RemoteAnalysisCacheModeConverter() {
113113
help = "Locator for the AnalysisCacheService instance.")
114114
public String analysisCacheService;
115115

116+
@Option(
117+
name = "experimental_managed_storage_service_table_name",
118+
defaultValue = "data",
119+
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
120+
effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
121+
help =
122+
"The table name to use in managed storage. Only applicable when the mode is UPLOAD and"
123+
+ " experimental_remote_analysis_cache refers to a managed storage path.")
124+
public String managedStorageServiceTableName;
125+
116126
@Option(
117127
name = "experimental_analysis_cache_key_distinguisher_for_testing",
118128
defaultValue = "null",

src/main/java/com/google/devtools/build/lib/skyframe/serialization/analysis/RemoteAnalysisCachingServicesSupplier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public interface RemoteAnalysisCachingServicesSupplier {
3737
*
3838
* <p>This method updates the services and parameters when the relevant flags change.
3939
*/
40-
default void configure(RemoteAnalysisCachingOptions cachingOptions, @Nullable ClientId clientId)
40+
default void configure(
41+
RemoteAnalysisCachingOptions cachingOptions, @Nullable ClientId clientId, String buildId)
4142
throws AbruptExitException {
4243
// Does nothing by default.
4344
}

0 commit comments

Comments
 (0)