mirror of
https://github.com/actions/cache.git
synced 2024-12-04 22:51:28 +01:00
Troubleshoot
This commit is contained in:
parent
fbbd57a122
commit
ec07d5423f
4 changed files with 68 additions and 32 deletions
25
dist/restore-only/index.js
vendored
25
dist/restore-only/index.js
vendored
|
@ -6290,6 +6290,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
else {
|
else {
|
||||||
core.warning(`Failed to save: ${typedError.message}`);
|
core.warning(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
// Try to delete the archive to save space
|
// Try to delete the archive to save space
|
||||||
|
@ -9838,15 +9839,23 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
|
||||||
maxSingleShotSize: 128 * 1024 * 1024,
|
maxSingleShotSize: 128 * 1024 * 1024,
|
||||||
onProgress: uploadProgress.onProgress()
|
onProgress: uploadProgress.onProgress()
|
||||||
};
|
};
|
||||||
// try {
|
try {
|
||||||
uploadProgress.startDisplayTimer();
|
uploadProgress.startDisplayTimer();
|
||||||
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
||||||
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
// TODO: better management of non-retryable errors
|
// TODO: better management of non-retryable errors
|
||||||
if (response._response.status >= 400) {
|
if (response._response.status >= 400) {
|
||||||
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Error uploading cache archive: ${error}`);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
uploadProgress.stopDisplayTimer();
|
||||||
}
|
}
|
||||||
return response;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
||||||
|
|
25
dist/restore/index.js
vendored
25
dist/restore/index.js
vendored
|
@ -6290,6 +6290,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
else {
|
else {
|
||||||
core.warning(`Failed to save: ${typedError.message}`);
|
core.warning(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
// Try to delete the archive to save space
|
// Try to delete the archive to save space
|
||||||
|
@ -9838,15 +9839,23 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
|
||||||
maxSingleShotSize: 128 * 1024 * 1024,
|
maxSingleShotSize: 128 * 1024 * 1024,
|
||||||
onProgress: uploadProgress.onProgress()
|
onProgress: uploadProgress.onProgress()
|
||||||
};
|
};
|
||||||
// try {
|
try {
|
||||||
uploadProgress.startDisplayTimer();
|
uploadProgress.startDisplayTimer();
|
||||||
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
||||||
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
// TODO: better management of non-retryable errors
|
// TODO: better management of non-retryable errors
|
||||||
if (response._response.status >= 400) {
|
if (response._response.status >= 400) {
|
||||||
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Error uploading cache archive: ${error}`);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
uploadProgress.stopDisplayTimer();
|
||||||
}
|
}
|
||||||
return response;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
||||||
|
|
25
dist/save-only/index.js
vendored
25
dist/save-only/index.js
vendored
|
@ -6290,6 +6290,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
else {
|
else {
|
||||||
core.warning(`Failed to save: ${typedError.message}`);
|
core.warning(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
// Try to delete the archive to save space
|
// Try to delete the archive to save space
|
||||||
|
@ -9838,15 +9839,23 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
|
||||||
maxSingleShotSize: 128 * 1024 * 1024,
|
maxSingleShotSize: 128 * 1024 * 1024,
|
||||||
onProgress: uploadProgress.onProgress()
|
onProgress: uploadProgress.onProgress()
|
||||||
};
|
};
|
||||||
// try {
|
try {
|
||||||
uploadProgress.startDisplayTimer();
|
uploadProgress.startDisplayTimer();
|
||||||
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
||||||
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
// TODO: better management of non-retryable errors
|
// TODO: better management of non-retryable errors
|
||||||
if (response._response.status >= 400) {
|
if (response._response.status >= 400) {
|
||||||
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Error uploading cache archive: ${error}`);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
uploadProgress.stopDisplayTimer();
|
||||||
}
|
}
|
||||||
return response;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
||||||
|
|
25
dist/save/index.js
vendored
25
dist/save/index.js
vendored
|
@ -6290,6 +6290,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
else {
|
else {
|
||||||
core.warning(`Failed to save: ${typedError.message}`);
|
core.warning(`Failed to save: ${typedError.message}`);
|
||||||
}
|
}
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
// Try to delete the archive to save space
|
// Try to delete the archive to save space
|
||||||
|
@ -9838,15 +9839,23 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
|
||||||
maxSingleShotSize: 128 * 1024 * 1024,
|
maxSingleShotSize: 128 * 1024 * 1024,
|
||||||
onProgress: uploadProgress.onProgress()
|
onProgress: uploadProgress.onProgress()
|
||||||
};
|
};
|
||||||
// try {
|
try {
|
||||||
uploadProgress.startDisplayTimer();
|
uploadProgress.startDisplayTimer();
|
||||||
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
|
||||||
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
// TODO: better management of non-retryable errors
|
// TODO: better management of non-retryable errors
|
||||||
if (response._response.status >= 400) {
|
if (response._response.status >= 400) {
|
||||||
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Error uploading cache archive: ${error}`);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
uploadProgress.stopDisplayTimer();
|
||||||
}
|
}
|
||||||
return response;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
|
||||||
|
|
Loading…
Reference in a new issue