Fix retries when uploading databases by henrymercer · Pull Request #3564 · github/codeql-action (original) (raw)

The current retry mechanism would pass a read stream that might have already been partially consumed. Instead, use a custom retry mechanism and pass a fresh read stream on each attempt.

An alternative that wouldn't need the custom retry mechanism would have been to read the database into a buffer, but databases might be multiple GBs so I wanted to keep a streaming approach.

Risk assessment

For internal use only. Please select the risk level of this change:

Which use cases does this change impact?

Workflow types:

Products:

Environments:

How did/will you validate this change?

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

How will you know if something goes wrong after this change is released?

Are there any special considerations for merging or releasing this change?

Merge / deployment checklist