mirror of
https://github.com/actions/upload-artifact.git
synced 2024-11-30 17:14:49 +08:00
Retry on 413 response codes (#108)
This commit is contained in:
parent
c8879bf5ae
commit
268d754764
9
dist/index.js
vendored
9
dist/index.js
vendored
@ -4052,7 +4052,7 @@ exports.getUploadFileConcurrency = getUploadFileConcurrency;
|
|||||||
// When uploading large files that can't be uploaded with a single http call, this controls
|
// When uploading large files that can't be uploaded with a single http call, this controls
|
||||||
// the chunk size that is used during upload
|
// the chunk size that is used during upload
|
||||||
function getUploadChunkSize() {
|
function getUploadChunkSize() {
|
||||||
return 4 * 1024 * 1024; // 4 MB Chunks
|
return 8 * 1024 * 1024; // 8 MB Chunks
|
||||||
}
|
}
|
||||||
exports.getUploadChunkSize = getUploadChunkSize;
|
exports.getUploadChunkSize = getUploadChunkSize;
|
||||||
// The maximum number of retries that can be attempted before an upload or download fails
|
// The maximum number of retries that can be attempted before an upload or download fails
|
||||||
@ -6658,7 +6658,7 @@ const upload_gzip_1 = __webpack_require__(647);
|
|||||||
const stat = util_1.promisify(fs.stat);
|
const stat = util_1.promisify(fs.stat);
|
||||||
class UploadHttpClient {
|
class UploadHttpClient {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.uploadHttpManager = new http_manager_1.HttpManager(config_variables_1.getUploadFileConcurrency(), 'actions/upload-artifact');
|
this.uploadHttpManager = new http_manager_1.HttpManager(config_variables_1.getUploadFileConcurrency(), '@actions/artifact-upload');
|
||||||
this.statusReporter = new status_reporter_1.StatusReporter(10000);
|
this.statusReporter = new status_reporter_1.StatusReporter(10000);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -7412,7 +7412,7 @@ const http_manager_1 = __webpack_require__(452);
|
|||||||
const config_variables_1 = __webpack_require__(401);
|
const config_variables_1 = __webpack_require__(401);
|
||||||
class DownloadHttpClient {
|
class DownloadHttpClient {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.downloadHttpManager = new http_manager_1.HttpManager(config_variables_1.getDownloadFileConcurrency(), 'actions/download-artifact');
|
this.downloadHttpManager = new http_manager_1.HttpManager(config_variables_1.getDownloadFileConcurrency(), '@actions/artifact-download');
|
||||||
// downloads are usually significantly faster than uploads so display status information every second
|
// downloads are usually significantly faster than uploads so display status information every second
|
||||||
this.statusReporter = new status_reporter_1.StatusReporter(1000);
|
this.statusReporter = new status_reporter_1.StatusReporter(1000);
|
||||||
}
|
}
|
||||||
@ -7942,7 +7942,8 @@ function isRetryableStatusCode(statusCode) {
|
|||||||
http_client_1.HttpCodes.BadGateway,
|
http_client_1.HttpCodes.BadGateway,
|
||||||
http_client_1.HttpCodes.ServiceUnavailable,
|
http_client_1.HttpCodes.ServiceUnavailable,
|
||||||
http_client_1.HttpCodes.GatewayTimeout,
|
http_client_1.HttpCodes.GatewayTimeout,
|
||||||
http_client_1.HttpCodes.TooManyRequests
|
http_client_1.HttpCodes.TooManyRequests,
|
||||||
|
413 // Payload Too Large
|
||||||
];
|
];
|
||||||
return retryableStatusCodes.includes(statusCode);
|
return retryableStatusCodes.includes(statusCode);
|
||||||
}
|
}
|
||||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -5,9 +5,9 @@
|
|||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": {
|
"@actions/artifact": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-0.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-0.3.5.tgz",
|
||||||
"integrity": "sha512-sKC1uA5p6064C6Qypmmt6O8iKlpDyMTfqqDlS4/zfJX1Hs8NbbzPLLN81RpewuJPWQNnroeF52w4VCWypbSNaA==",
|
"integrity": "sha512-y27pBEnUjOqCP2zUf86YkiqGOp1r0C9zUOmGmcxizsHMls0wvk+FJwd+l8JIoukvj1BeBHYP+c+9AEqOt5AqMA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/core": "^1.2.1",
|
"@actions/core": "^1.2.1",
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/actions/upload-artifact#readme",
|
"homepage": "https://github.com/actions/upload-artifact#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/artifact": "^0.3.3",
|
"@actions/artifact": "^0.3.5",
|
||||||
"@actions/core": "^1.2.3",
|
"@actions/core": "^1.2.3",
|
||||||
"@actions/glob": "^0.1.0",
|
"@actions/glob": "^0.1.0",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user