Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d4f40b

Browse files
Ashwin Sangemvsvipul
andauthored
Bumping up the version to fix download issue for files > 2 GB. (#775)
* Bumping up the version to fix download issue for files > 2 GB. * Update license for cache Co-authored-by: vsvipul <[email protected]>
1 parent 2d8d0d1 commit 7d4f40b

File tree

6 files changed

+77
-162
lines changed

6 files changed

+77
-162
lines changed

.licenses/npm/@actions/cache.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ See ["Caching dependencies to speed up workflows"](https://help.github.com/githu
1010

1111
## What's New
1212
### v3
13+
* Fixed download issue for files > 2GB during restore.
1314
* Updated the minimum runner version support from node 12 -> node 16.
1415

1516
### v2
@@ -181,7 +182,7 @@ steps:
181182

182183
Since GitHub Enterprise Server uses self-hosted runners, dependencies are typically cached on the runner by whatever dependency management tool is being used (npm, maven, etc.). This eliminates the need for explicit caching in some scenarios.
183184

184-
## Changelog schedule and history
185+
## Changelog schedule and history
185186

186187
| Status | Version | Date | Highlights |
187188
|:---|:---|:---|:---|

dist/restore/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5519,7 +5519,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
55195519
//
55205520
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
55215521
// on 64-bit systems), split the download into multiple segments
5522-
const maxSegmentSize = buffer.constants.MAX_LENGTH;
5522+
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
5523+
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
55235524
const downloadProgress = new DownloadProgress(contentLength);
55245525
const fd = fs.openSync(archivePath, 'w');
55255526
try {

dist/save/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5519,7 +5519,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
55195519
//
55205520
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
55215521
// on 64-bit systems), split the download into multiple segments
5522-
const maxSegmentSize = buffer.constants.MAX_LENGTH;
5522+
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
5523+
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
55235524
const downloadProgress = new DownloadProgress(contentLength);
55245525
const fd = fs.openSync(archivePath, 'w');
55255526
try {

package-lock.json

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

0 commit comments

Comments
 (0)