Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.1.0] Make SpawnLogContext interruptible. #21337

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public abstract void logSpawn(
FileSystem fileSystem,
Duration timeout,
SpawnResult result)
throws IOException, ExecException;
throws IOException, InterruptedException, ExecException;

/** Finishes writing the log and performs any required post-processing. */
public abstract void close() throws IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void testTransitiveNestedSet(@TestParameter InputsMode inputsMode) throws

@Override
protected SpawnLogContext createSpawnLogContext(ImmutableMap<String, String> platformProperties)
throws IOException {
throws IOException, InterruptedException {
RemoteOptions remoteOptions = Options.getDefaults(RemoteOptions.class);
remoteOptions.remoteDefaultExecProperties = platformProperties.entrySet().asList();

Expand All @@ -113,7 +113,7 @@ protected SpawnLogContext createSpawnLogContext(ImmutableMap<String, String> pla

@Override
protected void closeAndAssertLog(SpawnLogContext context, SpawnExec... expected)
throws IOException {
throws IOException, InterruptedException {
context.close();

ArrayList<SpawnExec> actual = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class ExpandedSpawnLogContextTest extends SpawnLogContextTestBase {

@Override
protected SpawnLogContext createSpawnLogContext(ImmutableMap<String, String> platformProperties)
throws IOException {
throws IOException, InterruptedException {
RemoteOptions remoteOptions = Options.getDefaults(RemoteOptions.class);
remoteOptions.remoteDefaultExecProperties = platformProperties.entrySet().asList();

Expand All @@ -54,7 +54,7 @@ protected SpawnLogContext createSpawnLogContext(ImmutableMap<String, String> pla

@Override
protected void closeAndAssertLog(SpawnLogContext context, SpawnExec... expected)
throws IOException {
throws IOException, InterruptedException {
context.close();

ArrayList<SpawnExec> actual = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,12 +957,12 @@ protected static TreeArtifactValue createTreeArtifactValue(Artifact tree) throws
return builder.build();
}

protected SpawnLogContext createSpawnLogContext() throws IOException {
protected SpawnLogContext createSpawnLogContext() throws IOException, InterruptedException {
return createSpawnLogContext(ImmutableSortedMap.of());
}

protected abstract SpawnLogContext createSpawnLogContext(
ImmutableMap<String, String> platformProperties) throws IOException;
ImmutableMap<String, String> platformProperties) throws IOException, InterruptedException;

protected Digest getDigest(String content) {
return Digest.newBuilder()
Expand All @@ -982,5 +982,5 @@ protected static void writeFile(Path path, String contents) throws IOException {
}

protected abstract void closeAndAssertLog(SpawnLogContext context, SpawnExec... expected)
throws IOException;
throws IOException, InterruptedException;
}
Loading