Skip to content

go-test job fails when go_text_report file is too big

Describe the bug

The "go-test" job fails when go_text_report file is too big.

The dump of the text report in the console fails (cat "$go_text_report"). This is a known issue in gitlab-ci runner. See this ticket for more information : #29231.

Since the cat commands exit with an error code, the whole job fails.

Expected behavior

The "go-test" job should not fails when the cat "$go_text_report" command returns a non-zero output code.

Actual behavior

The "go-test" job is failing when the cat "$go_text_report" command returns a non-zero output code.

Logs and/or screenshots

Error visible in runner logs :

cat: write error: Resource temporarily unavailable

And a the end of the job :

Uploading artifacts...
/reports/go-test.*: found 1 matching artifact files and directories 
reports/go-coverage.*: found 1 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  id=29404785 responseStatus=201 Created token=64_3AWZZ
Uploading artifacts...
WARNING: reports/go-test.xunit.xml: no matching files. Ensure that the artifact path is relative to the working directory (/builds/path/to/project) 
ERROR: No files to upload                          
Uploading artifacts...
WARNING: reports/go-coverage.cobertura.xml: no matching files. Ensure that the artifact path is relative to the working directory (/builds/path/to/project) 
ERROR: No files to upload                          
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

Context & Configuration

The issue was reproduced using:

  • Version of the template: 3.1.0
  • GitLab server(s): A self-managed server
  • GitLab runner(s): -