Fix default artifacts upload timeout values

What does this MR do?

The --timeout and --response-header-timeout flags on artifacts-uploader default to 0s (the zero value of time.Duration). Because NewArtifactsUploaderCommand passes &cmd.Timeout as a pointer to the HTTP client options, the pointer is always non-nil, so the client always overrides its own DefaultNetworkClientTimeout (60min) with 0, effectively killing uploads immediately when the flag is omitted.

This breaks mixed-version environments where an 18.10.0 runner manager invokes an 18.9.x helper that doesn't recognize --timeout, as well as any invocation that simply omits the flag.

Why was this MR needed?

What's the best way to test this MR?

What are the relevant issue numbers?

Closes Artifacts uploader --timeout flag breaks mixed-... (#39339 - closed) • Axel von Bertoldi

Edited by Georgi N. Georgiev | GitLab

Merge request reports

Loading