Skip to content

Commit 268d754

Browse files
authored
Retry on 413 response codes (#108)
1 parent c8879bf commit 268d754

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

dist/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4052,7 +4052,7 @@ exports.getUploadFileConcurrency = getUploadFileConcurrency;
40524052
// When uploading large files that can't be uploaded with a single http call, this controls
40534053
// the chunk size that is used during upload
40544054
function getUploadChunkSize() {
4055-
return 4 * 1024 * 1024; // 4 MB Chunks
4055+
return 8 * 1024 * 1024; // 8 MB Chunks
40564056
}
40574057
exports.getUploadChunkSize = getUploadChunkSize;
40584058
// 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);
66586658
const stat = util_1.promisify(fs.stat);
66596659
class UploadHttpClient {
66606660
constructor() {
6661-
this.uploadHttpManager = new http_manager_1.HttpManager(config_variables_1.getUploadFileConcurrency(), 'actions/upload-artifact');
6661+
this.uploadHttpManager = new http_manager_1.HttpManager(config_variables_1.getUploadFileConcurrency(), '@actions/artifact-upload');
66626662
this.statusReporter = new status_reporter_1.StatusReporter(10000);
66636663
}
66646664
/**
@@ -7412,7 +7412,7 @@ const http_manager_1 = __webpack_require__(452);
74127412
const config_variables_1 = __webpack_require__(401);
74137413
class DownloadHttpClient {
74147414
constructor() {
7415-
this.downloadHttpManager = new http_manager_1.HttpManager(config_variables_1.getDownloadFileConcurrency(), 'actions/download-artifact');
7415+
this.downloadHttpManager = new http_manager_1.HttpManager(config_variables_1.getDownloadFileConcurrency(), '@actions/artifact-download');
74167416
// downloads are usually significantly faster than uploads so display status information every second
74177417
this.statusReporter = new status_reporter_1.StatusReporter(1000);
74187418
}
@@ -7942,7 +7942,8 @@ function isRetryableStatusCode(statusCode) {
79427942
http_client_1.HttpCodes.BadGateway,
79437943
http_client_1.HttpCodes.ServiceUnavailable,
79447944
http_client_1.HttpCodes.GatewayTimeout,
7945-
http_client_1.HttpCodes.TooManyRequests
7945+
http_client_1.HttpCodes.TooManyRequests,
7946+
413 // Payload Too Large
79467947
];
79477948
return retryableStatusCodes.includes(statusCode);
79487949
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"homepage": "https://github.com/actions/upload-artifact#readme",
3131
"devDependencies": {
32-
"@actions/artifact": "^0.3.3",
32+
"@actions/artifact": "^0.3.5",
3333
"@actions/core": "^1.2.3",
3434
"@actions/glob": "^0.1.0",
3535
"@actions/io": "^1.0.2",

0 commit comments

Comments
 (0)