Bash uploader script upload_file setting

Summary

Add an argument to the bash uploader to specify the directory location for the upload_file

Description

Currently, the bash script has

upload_file=mktemp /tmp/codecov.XXXXXX
adjustments_file=mktemp /tmp/codecov.adjustments.XXXXXX

hardwired. I would like to propose that an argument be introduced that could replace “/tmp”. Our test suite takes a few hours to run and go thru the gcov processing. At the end, we have had many cases where the upload file never makes it to codecov.io (which is a separate issue). The upload_file in /tmp then gets deleted. If we could specify a different path, that file would be saved, and it would be possible to manually upload the file later without having to go thru the full gcov processing from scratch. If the upload process were more reliable, this might not be needed.

Examples

A proposed name for the argument is --upload-dir but I leave it to the developers to decide.

bash -c “bash <(curl -s https://codecov.io/bash) --upload-dir /scratch/username”

Versions

current bash uploader script

Thanks for this @apcraig. As an intermediary, would it be acceptable to add a flag that outputs to stdout and attempts to upload?

I’d be OK with that. I guess a user could capture the output. As a followup, if the attempted upload does not work, is there a way for a user to invoke the upload without running the entire bash script again?

1 Like

For sure, I think it would be a good first step to at least be able to capture the file. Currently there is no way to invoke uploads again without running the entire bash script again. Some users have wrapped the codecov step with retries depending on the exit code.

Hi @apcraig, made this change to save down the uploaded report here. You should be able to use it when we deploy next week.

Hi @apcraig, this is now live. You can use the -q flag to save down the file.