Loading dist/restore/index.js +4 −5 Changes for dist/restore/index.js: 4 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -2376,7 +2376,7 @@ function getContentRange(start, end) { // Content-Range: bytes 0-199/* return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, data, start, end) { function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter(this, void 0, void 0, function* () { core.debug(`Uploading chunk of size ${end - start + Loading @@ -2385,7 +2385,7 @@ function uploadChunk(httpClient, resourceUrl, data, start, end) { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, data, additionalHeaders)); yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders)); }); } function parseEnvNumber(key) { Loading Loading @@ -2415,13 +2415,12 @@ function uploadFile(httpClient, cacheId, archivePath) { const start = offset; const end = offset + chunkSize - 1; offset += MAX_CHUNK_SIZE; const chunk = fs.createReadStream(archivePath, { yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }); yield uploadChunk(httpClient, resourceUrl, chunk, start, end); }), start, end); } }))); } Loading dist/save/index.js +4 −5 Changes for dist/save/index.js: 4 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -2376,7 +2376,7 @@ function getContentRange(start, end) { // Content-Range: bytes 0-199/* return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, data, start, end) { function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter(this, void 0, void 0, function* () { core.debug(`Uploading chunk of size ${end - start + Loading @@ -2385,7 +2385,7 @@ function uploadChunk(httpClient, resourceUrl, data, start, end) { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, data, additionalHeaders)); yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders)); }); } function parseEnvNumber(key) { Loading Loading @@ -2415,13 +2415,12 @@ function uploadFile(httpClient, cacheId, archivePath) { const start = offset; const end = offset + chunkSize - 1; offset += MAX_CHUNK_SIZE; const chunk = fs.createReadStream(archivePath, { yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }); yield uploadChunk(httpClient, resourceUrl, chunk, start, end); }), start, end); } }))); } Loading src/cacheHttpClient.ts +14 −9 Changes for src/cacheHttpClient.ts: 14 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ function getContentRange(start: number, end: number): string { async function uploadChunk( httpClient: HttpClient, resourceUrl: string, data: NodeJS.ReadableStream, openStream: () => NodeJS.ReadableStream, start: number, end: number ): Promise<void> { Loading @@ -307,7 +307,12 @@ async function uploadChunk( await retryHttpClientResponse( `uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, data, additionalHeaders) httpClient.sendStream( "PATCH", resourceUrl, openStream(), additionalHeaders ) ); } Loading Loading @@ -349,17 +354,17 @@ async function uploadFile( const start = offset; const end = offset + chunkSize - 1; offset += MAX_CHUNK_SIZE; const chunk = fs.createReadStream(archivePath, { fd, start, end, autoClose: false }); await uploadChunk( httpClient, resourceUrl, chunk, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }), start, end ); Loading Loading
dist/restore/index.js +4 −5 Changes for dist/restore/index.js: 4 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -2376,7 +2376,7 @@ function getContentRange(start, end) { // Content-Range: bytes 0-199/* return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, data, start, end) { function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter(this, void 0, void 0, function* () { core.debug(`Uploading chunk of size ${end - start + Loading @@ -2385,7 +2385,7 @@ function uploadChunk(httpClient, resourceUrl, data, start, end) { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, data, additionalHeaders)); yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders)); }); } function parseEnvNumber(key) { Loading Loading @@ -2415,13 +2415,12 @@ function uploadFile(httpClient, cacheId, archivePath) { const start = offset; const end = offset + chunkSize - 1; offset += MAX_CHUNK_SIZE; const chunk = fs.createReadStream(archivePath, { yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }); yield uploadChunk(httpClient, resourceUrl, chunk, start, end); }), start, end); } }))); } Loading
dist/save/index.js +4 −5 Changes for dist/save/index.js: 4 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -2376,7 +2376,7 @@ function getContentRange(start, end) { // Content-Range: bytes 0-199/* return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, data, start, end) { function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter(this, void 0, void 0, function* () { core.debug(`Uploading chunk of size ${end - start + Loading @@ -2385,7 +2385,7 @@ function uploadChunk(httpClient, resourceUrl, data, start, end) { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, data, additionalHeaders)); yield retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders)); }); } function parseEnvNumber(key) { Loading Loading @@ -2415,13 +2415,12 @@ function uploadFile(httpClient, cacheId, archivePath) { const start = offset; const end = offset + chunkSize - 1; offset += MAX_CHUNK_SIZE; const chunk = fs.createReadStream(archivePath, { yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }); yield uploadChunk(httpClient, resourceUrl, chunk, start, end); }), start, end); } }))); } Loading
src/cacheHttpClient.ts +14 −9 Changes for src/cacheHttpClient.ts: 14 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ function getContentRange(start: number, end: number): string { async function uploadChunk( httpClient: HttpClient, resourceUrl: string, data: NodeJS.ReadableStream, openStream: () => NodeJS.ReadableStream, start: number, end: number ): Promise<void> { Loading @@ -307,7 +307,12 @@ async function uploadChunk( await retryHttpClientResponse( `uploadChunk (start: ${start}, end: ${end})`, () => httpClient.sendStream("PATCH", resourceUrl, data, additionalHeaders) httpClient.sendStream( "PATCH", resourceUrl, openStream(), additionalHeaders ) ); } Loading Loading @@ -349,17 +354,17 @@ async function uploadFile( const start = offset; const end = offset + chunkSize - 1; offset += MAX_CHUNK_SIZE; const chunk = fs.createReadStream(archivePath, { fd, start, end, autoClose: false }); await uploadChunk( httpClient, resourceUrl, chunk, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }), start, end ); Loading