Skip to content

Piping "curl --retry 8" direct to "tar" negates benefits of retrying #48129

@droberts195

Description

@droberts195

On the 6.8 branch the Docker build has to download a JDK:

RUN curl -L --retry 8 -s ${jdkUrl} | tar -C /opt -zxf -

Two builds recently failed on this line:

  Step 4/29 : RUN curl -L --retry 8 -s https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_linux_hotspot_13_33.tar.gz | tar -C /opt -zxf -
   ---> Running in 29784e13f74f
  
  gzip: stdin: unexpected end of file
  tar: Unexpected EOF in archive
  tar: Unexpected EOF in archive
  tar: Error is not recoverable: exiting now

I suspect the benefit of the --retry is being lost because if a retry occurs after some of the previous attempt has been piped to tar then the overall input to tar will be corrupt. To get the benefit of --retry maybe it's better to download to a temporary file, then extract that only after curl has returned success, then finally delete the temporary file?

Metadata

Metadata

Assignees

Labels

:Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scripts>test-failureTriaged test failures from CITeam:DeliveryMeta label for Delivery teamv6.8.5

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions