Merge branch 'main' into robherley/artifact-digest

This commit is contained in:
Rob Herley
2022-05-19 11:45:42 -04:00
committed by GitHub
51 changed files with 2800 additions and 280 deletions

View File

@@ -32,8 +32,7 @@ import {promisify} from 'util'
import {URL} from 'url'
import {performance} from 'perf_hooks'
import {StatusReporter} from './status-reporter'
import {HttpCodes} from '@actions/http-client'
import {IHttpClientResponse} from '@actions/http-client/interfaces'
import {HttpCodes, HttpClientResponse} from '@actions/http-client'
import {HttpManager} from './http-manager'
import {UploadSpecification} from './upload-specification'
import {UploadOptions} from './upload-options'
@@ -421,7 +420,7 @@ export class UploadHttpClient {
digest
)
const uploadChunkRequest = async (): Promise<IHttpClientResponse> => {
const uploadChunkRequest = async (): Promise<HttpClientResponse> => {
const client = this.uploadHttpManager.getClient(httpClientIndex)
return await client.sendStream('PUT', resourceUrl, openStream(), headers)
}
@@ -432,7 +431,7 @@ export class UploadHttpClient {
// Increments the current retry count and then checks if the retry limit has been reached
// If there have been too many retries, fail so the download stops
const incrementAndCheckRetryLimit = (
response?: IHttpClientResponse
response?: HttpClientResponse
): boolean => {
retryCount++
if (retryCount > retryLimit) {
@@ -469,7 +468,7 @@ export class UploadHttpClient {
// allow for failed chunks to be retried multiple times
while (retryCount <= retryLimit) {
let response: IHttpClientResponse
let response: HttpClientResponse
try {
response = await uploadChunkRequest()