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

retry builds on unexpected EOF error #1545

Closed
Closed
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
7 changes: 5 additions & 2 deletions tools/buildsys/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ static DOCKER_BUILD_FRONTEND_ERROR: &str = concat!(
r#"frontend grpc server closed unexpectedly"#
);

/* We also see sporadic CI failures with only this error message. */
static UNEXPECTED_EOF_ERROR: &str = "unexpected EOF";
bcressey marked this conversation as resolved.
Show resolved Hide resolved

static DOCKER_BUILD_MAX_ATTEMPTS: NonZeroU16 = nonzero!(10u16);

pub(crate) struct PackageBuilder;
Expand Down Expand Up @@ -210,12 +213,12 @@ fn build(
let _ = docker(&rmi, Retry::No);

// Build the image, which builds the artifacts we want.
// Work around a transient, known failure case with Docker.
// Work around transient, known failure cases with Docker.
docker(
&build,
Retry::Yes {
attempts: DOCKER_BUILD_MAX_ATTEMPTS,
messages: &[DOCKER_BUILD_FRONTEND_ERROR],
messages: &[DOCKER_BUILD_FRONTEND_ERROR, UNEXPECTED_EOF_ERROR],
},
)?;

Expand Down