CNG: `gitlab-rails-ce`/`gitlab-rails-ee` sometimes fail at the NodeJS downloading step

Summary

See:

 Step 26/63 : RUN curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"   | tar --strip-components 1 -xzC /usr/local/
  ---> Running in 68a08e4dd34c
 curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)
 gzip: stdin: unexpected end of file
 tar: Unexpected EOF in archive
 tar: Unexpected EOF in archive
 tar: Error is not recoverable: exiting now
 The command '/bin/sh -c curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"   | tar --strip-components 1 -xzC /usr/local/' returned a non-zero code: 2
 Step 27/65 : RUN curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"   | tar --strip-components 1 -xzC /usr/local/
  ---> Running in 0580fc35e278
 curl: (22) The requested URL returned error: 500 
 gzip: stdin: unexpected end of file
 tar: Child returned status 1
 tar: Error is not recoverable: exiting now
 The command '/bin/sh -c curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"   | tar --strip-components 1 -xzC /usr/local/' returned a non-zero code: 2

These are two different errors, but at the same step:

Current behavior

Upstream codebase server issued a 500, but the Job immediately failed

Expected behavior

Fetch of upstream to retry in the event of a failure, (hopefully) allowing the rest of the job to succeed.

Versions

CNG @ 3c7ef1ba18a2c361139975379f16c8b00f7156a5

Relevant logs

See above.

Edited by Jason Plum