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:
- High risk: Changes are not fully under feature flags, have limited visibility and/or cannot be tested outside of production.
Which use cases does this change impact?
Workflow types:
- Advanced setup - Impacts users who have custom CodeQL workflows.
- Managed - Impacts users with
dynamicworkflows (Default Setup, Code Quality, ...).
Products:
- Code Scanning - The changes impact analyses when
analysis-kinds: code-scanning.
Environments:
- Dotcom - Impacts CodeQL workflows on
github.comand/or GitHub Enterprise Cloud with Data Residency. - GHES - Impacts CodeQL workflows on GitHub Enterprise Server.
How did/will you validate this change?
- Unit tests - I am depending on unit test coverage (i.e. tests in
.test.tsfiles).
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
- Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.
How will you know if something goes wrong after this change is released?
- Telemetry - I rely on existing telemetry or have made changes to the telemetry.
- Alerts - New or existing monitors will trip if something goes wrong with this change.
Are there any special considerations for merging or releasing this change?
- No special considerations - This change can be merged at any time.