From 7f48f089250e3d9cb443d328a8df99075be872d6 Mon Sep 17 00:00:00 2001 From: Dave Hadka Date: Thu, 5 Nov 2020 15:12:18 -0600 Subject: [PATCH 1/3] Bump @actions/cache to 1.0.4 --- dist/restore/index.js | 5 ++++- dist/save/index.js | 5 ++++- package-lock.json | 8 ++++---- package.json | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index 433bd68..bf3053d 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -3267,9 +3267,12 @@ function uploadChunk(httpClient, resourceUrl, openStream, start, end) { 'Content-Type': 'application/octet-stream', 'Content-Range': getContentRange(start, end) }; - yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { + const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); })); + if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) { + throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); + } }); } function uploadFile(httpClient, cacheId, archivePath, options) { diff --git a/dist/save/index.js b/dist/save/index.js index d4cdd08..80a93af 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -3267,9 +3267,12 @@ function uploadChunk(httpClient, resourceUrl, openStream, start, end) { 'Content-Type': 'application/octet-stream', 'Content-Range': getContentRange(start, end) }; - yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { + const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); })); + if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) { + throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); + } }); } function uploadFile(httpClient, cacheId, archivePath, options) { diff --git a/package-lock.json b/package-lock.json index cc8a905..dc1c62d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,11 +5,11 @@ "requires": true, "dependencies": { "@actions/cache": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.3.tgz", - "integrity": "sha512-2DcdMrqbfj5LcsEYIh6ACgjb0bNMeMPP7y1a+bf/Sk0MFfkkrYRNFihkXRV6v0TNkNo0b5X38xmUguRZ5ZPLbw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.4.tgz", + "integrity": "sha512-1grYfbu8P6JDDHc40eOI5tQDRcAxMwq5HBWhaCqEg9o/ixDRZfwPHlQvQAop2ZzFCjF2ns0ENQOIBAH8GNn+zA==", "requires": { - "@actions/core": "^1.2.4", + "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", "@actions/glob": "^0.1.0", "@actions/http-client": "^1.0.9", diff --git a/package.json b/package.json index 8528893..9050719 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@actions/cache": "^1.0.3", + "@actions/cache": "^1.0.4", "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", "@actions/io": "^1.0.1" From 65a44e7aac6df3d29051c2acea198964531da3fe Mon Sep 17 00:00:00 2001 From: David Hadka Date: Thu, 5 Nov 2020 15:14:33 -0600 Subject: [PATCH 2/3] Update license file --- .licenses/npm/@actions/cache.dep.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.licenses/npm/@actions/cache.dep.yml b/.licenses/npm/@actions/cache.dep.yml index 53954a1..bf3cae2 100644 --- a/.licenses/npm/@actions/cache.dep.yml +++ b/.licenses/npm/@actions/cache.dep.yml @@ -1,9 +1,9 @@ --- name: "@actions/cache" -version: 1.0.3 +version: 1.0.4 type: npm -summary: Actions cache lib -homepage: https://github.com/actions/toolkit/tree/main/packages/cache +summary: +homepage: license: mit licenses: - sources: LICENSE.md From f8d592f91f9cdc79b8fbdd2991bdb678f1ce0602 Mon Sep 17 00:00:00 2001 From: David Hadka Date: Thu, 5 Nov 2020 15:17:03 -0600 Subject: [PATCH 3/3] Manually update summary and homepage in license --- .licenses/npm/@actions/cache.dep.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.licenses/npm/@actions/cache.dep.yml b/.licenses/npm/@actions/cache.dep.yml index bf3cae2..a4523c3 100644 --- a/.licenses/npm/@actions/cache.dep.yml +++ b/.licenses/npm/@actions/cache.dep.yml @@ -2,8 +2,8 @@ name: "@actions/cache" version: 1.0.4 type: npm -summary: -homepage: +summary: Actions cache lib +homepage: https://github.com/actions/toolkit/tree/main/packages/cache license: mit licenses: - sources: LICENSE.md