Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/artifact/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@

- Increase chunk size during upload from 4MB to 8MB
- Improve user-agent strings during API calls to help internally diagnose issues

### 0.3.4

- Retry in the event of a 413 response
1 change: 1 addition & 0 deletions packages/artifact/__tests__/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ describe('Utils', () => {
expect(utils.isRetryableStatusCode(HttpCodes.OK)).toEqual(false)
expect(utils.isRetryableStatusCode(HttpCodes.NotFound)).toEqual(false)
expect(utils.isRetryableStatusCode(HttpCodes.Forbidden)).toEqual(false)
expect(utils.isRetryableStatusCode(413)).toEqual(true) // Payload Too Large
})

it('Test Throttled Status Code', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/artifact/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/artifact/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@actions/artifact",
"version": "0.3.3",
"version": "0.3.4",
"preview": true,
"description": "Actions artifact lib",
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion packages/artifact/src/internal/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export function isRetryableStatusCode(statusCode?: number): boolean {
HttpCodes.BadGateway,
HttpCodes.ServiceUnavailable,
HttpCodes.GatewayTimeout,
HttpCodes.TooManyRequests
HttpCodes.TooManyRequests,
413 // Payload Too Large
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded for now. Will update in the future once a new version of actions/http-client is out: actions/http-client#31

]
return retryableStatusCodes.includes(statusCode)
}
Expand Down