The "local upload" feature currently works by passing a report_code to all the various upload-related CLI commands and API calls.
The upload processing is then run as usual, but results are stored slightly differently:
- The
report_json is stored once per commit.
- But a different
chunks file is stored depending on the report_code.
We can thus end up in a situation where the report_json/chunks get out of sync, and a "local upload" corrupts an existing commit report by overwriting its report_json with one that does not correspond to the main chunks file anymore.
For this reason, I believe that the "local upload" feature is fundamentally broken. We should thus work towards deprecating and removing it.
Removing the "local upload" and report_code feature also opens up the possibility to tackle some further internal refactorings:
The "local upload" feature currently works by passing a
report_codeto all the various upload-related CLI commands and API calls.The upload processing is then run as usual, but results are stored slightly differently:
report_jsonis stored once per commit.chunksfile is stored depending on thereport_code.We can thus end up in a situation where the
report_json/chunksget out of sync, and a "local upload" corrupts an existing commit report by overwriting itsreport_jsonwith one that does not correspond to the mainchunksfile anymore.For this reason, I believe that the "local upload" feature is fundamentally broken. We should thus work towards deprecating and removing it.
Removing the "local upload" and
report_codefeature also opens up the possibility to tackle some further internal refactorings:Commit/Reporttables/concepts/code #2617ReportResultsendpoints codecov-api#1291save_report_resultstask worker#1214report_codeusage umbrella#63report_codeumbrella#81staticanalysisandlocal-uploadrelated entities umbrella#80