Skip to content

Commit

Permalink
Bumping up the version to fix download issue for files > 2 GB. (#775)
Browse files Browse the repository at this point in the history
* Bumping up the version to fix download issue for files > 2 GB.

* Update license for cache

Co-authored-by: vsvipul <vsvipul@github.com>
  • Loading branch information
2 people authored and GitHub committed Mar 30, 2022
1 parent 2d8d0d1 commit 7d4f40b
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 162 deletions.
2 changes: 1 addition & 1 deletion .licenses/npm/@actions/cache.dep.yml

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

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ See ["Caching dependencies to speed up workflows"](https://help.github.com/githu

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

### v2
Expand Down Expand Up @@ -181,7 +182,7 @@ steps:

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.

## Changelog schedule and history
## Changelog schedule and history

| Status | Version | Date | Highlights |
|:---|:---|:---|:---|
Expand Down
3 changes: 2 additions & 1 deletion dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5519,7 +5519,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
//
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
// on 64-bit systems), split the download into multiple segments
const maxSegmentSize = buffer.constants.MAX_LENGTH;
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
const downloadProgress = new DownloadProgress(contentLength);
const fd = fs.openSync(archivePath, 'w');
try {
Expand Down
3 changes: 2 additions & 1 deletion dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5519,7 +5519,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
//
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
// on 64-bit systems), split the download into multiple segments
const maxSegmentSize = buffer.constants.MAX_LENGTH;
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
const downloadProgress = new DownloadProgress(contentLength);
const fd = fs.openSync(archivePath, 'w');
try {
Expand Down
214 changes: 63 additions & 151 deletions package-lock.json

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

Loading

0 comments on commit 7d4f40b

Please sign in to comment.