Skip to content

Commit

Permalink
Remove unused code for AuthHeadersProvider.
Browse files Browse the repository at this point in the history
This was added in 2019 and was [abandoned](#4889 (comment)).

PiperOrigin-RevId: 719331882
Change-Id: I29fe2d41146ca72adc7844c19dc3bde6e2353997
  • Loading branch information
justinhorvitz authored and copybara-github committed Jan 24, 2025
1 parent 81add1c commit 746bc57
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 84 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public final class BlazeRuntime implements BugReport.BlazeRuntimeInterface {
private final String productName;
private final BuildEventArtifactUploaderFactoryMap buildEventArtifactUploaderFactoryMap;
private final ActionKeyContext actionKeyContext;
private final ImmutableMap<String, AuthHeadersProvider> authHeadersProviderMap;
@Nullable private final RepositoryRemoteExecutorFactory repositoryRemoteExecutorFactory;

// Workspace state (currently exactly one workspace per server)
Expand Down Expand Up @@ -228,7 +227,6 @@ private BlazeRuntime(
Iterable<BlazeCommand> commands,
String productName,
BuildEventArtifactUploaderFactoryMap buildEventArtifactUploaderFactoryMap,
ImmutableMap<String, AuthHeadersProvider> authHeadersProviderMap,
RepositoryRemoteExecutorFactory repositoryRemoteExecutorFactory,
InstrumentationOutputFactory instrumentationOutputFactory,
FileSystemLock installBaseLock) {
Expand Down Expand Up @@ -258,8 +256,6 @@ private BlazeRuntime(
new CommandNameCacheImpl(commandMap));
this.productName = productName;
this.buildEventArtifactUploaderFactoryMap = buildEventArtifactUploaderFactoryMap;
this.authHeadersProviderMap =
Preconditions.checkNotNull(authHeadersProviderMap, "authHeadersProviderMap");
this.repositoryRemoteExecutorFactory = repositoryRemoteExecutorFactory;
this.instrumentationOutputFactory = instrumentationOutputFactory;
this.installBaseLock = installBaseLock;
Expand Down Expand Up @@ -1565,11 +1561,6 @@ public BuildEventArtifactUploaderFactoryMap getBuildEventArtifactUploaderFactory
return buildEventArtifactUploaderFactoryMap;
}

/** Returns a map of all registered {@link AuthHeadersProvider}s. */
public ImmutableMap<String, AuthHeadersProvider> getAuthHeadersProvidersMap() {
return authHeadersProviderMap;
}

public RepositoryRemoteExecutorFactory getRepositoryRemoteExecutorFactory() {
return repositoryRemoteExecutorFactory;
}
Expand Down Expand Up @@ -1711,7 +1702,6 @@ public BlazeRuntime build() throws AbruptExitException {
serverBuilder.getCommands(),
productName,
serverBuilder.getBuildEventArtifactUploaderMap(),
serverBuilder.getAuthHeadersProvidersMap(),
serverBuilder.getRepositoryRemoteExecutorFactory(),
serverBuilder.createInstrumentationOutputFactory(),
installBaseLock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public final class ServerBuilder {
ImmutableList.builder();
private final BuildEventArtifactUploaderFactoryMap.Builder buildEventArtifactUploaderFactories =
new BuildEventArtifactUploaderFactoryMap.Builder();
private final ImmutableMap.Builder<String, AuthHeadersProvider> authHeadersProvidersMap =
ImmutableMap.builder();
private RepositoryRemoteExecutorFactory repositoryRemoteExecutorFactory;
private final InstrumentationOutputFactory.Builder instrumentationOutputFactoryBuilder =
new InstrumentationOutputFactory.Builder();
Expand Down Expand Up @@ -172,22 +170,6 @@ public ServerBuilder setRepositoryRemoteExecutorFactory(
return this;
}

/**
* Register a provider of authentication headers that blaze modules can use. See {@link
* AuthHeadersProvider} for more details.
*/
@CanIgnoreReturnValue
public ServerBuilder addAuthHeadersProvider(
String name, AuthHeadersProvider authHeadersProvider) {
authHeadersProvidersMap.put(name, authHeadersProvider);
return this;
}

/** Returns a map of all registered {@link AuthHeadersProvider}s. */
public ImmutableMap<String, AuthHeadersProvider> getAuthHeadersProvidersMap() {
return authHeadersProvidersMap.buildOrThrow();
}

/**
* Returns the builder for {@link InstrumentationOutputFactory} so that suppliers for different
* types of {@link InstrumentationOutputBuilder} can be added.
Expand Down

0 comments on commit 746bc57

Please sign in to comment.