mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 15:48:39 +08:00 
			
		
		
		
	Troubleshoot
This commit is contained in:
		
							parent
							
								
									bf08ee6b81
								
							
						
					
					
						commit
						fbbd57a122
					
				
							
								
								
									
										24
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -9838,23 +9838,15 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
 | 
			
		|||
            maxSingleShotSize: 128 * 1024 * 1024,
 | 
			
		||||
            onProgress: uploadProgress.onProgress()
 | 
			
		||||
        };
 | 
			
		||||
        try {
 | 
			
		||||
            uploadProgress.startDisplayTimer();
 | 
			
		||||
            core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
            const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
            // TODO: better management of non-retryable errors
 | 
			
		||||
            if (response._response.status >= 400) {
 | 
			
		||||
                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();
 | 
			
		||||
        // try {
 | 
			
		||||
        uploadProgress.startDisplayTimer();
 | 
			
		||||
        core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
        const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
        // TODO: better management of non-retryable errors
 | 
			
		||||
        if (response._response.status >= 400) {
 | 
			
		||||
            throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
 | 
			
		||||
        }
 | 
			
		||||
        return response;
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										24
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -9838,23 +9838,15 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
 | 
			
		|||
            maxSingleShotSize: 128 * 1024 * 1024,
 | 
			
		||||
            onProgress: uploadProgress.onProgress()
 | 
			
		||||
        };
 | 
			
		||||
        try {
 | 
			
		||||
            uploadProgress.startDisplayTimer();
 | 
			
		||||
            core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
            const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
            // TODO: better management of non-retryable errors
 | 
			
		||||
            if (response._response.status >= 400) {
 | 
			
		||||
                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();
 | 
			
		||||
        // try {
 | 
			
		||||
        uploadProgress.startDisplayTimer();
 | 
			
		||||
        core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
        const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
        // TODO: better management of non-retryable errors
 | 
			
		||||
        if (response._response.status >= 400) {
 | 
			
		||||
            throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
 | 
			
		||||
        }
 | 
			
		||||
        return response;
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										24
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -9838,23 +9838,15 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
 | 
			
		|||
            maxSingleShotSize: 128 * 1024 * 1024,
 | 
			
		||||
            onProgress: uploadProgress.onProgress()
 | 
			
		||||
        };
 | 
			
		||||
        try {
 | 
			
		||||
            uploadProgress.startDisplayTimer();
 | 
			
		||||
            core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
            const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
            // TODO: better management of non-retryable errors
 | 
			
		||||
            if (response._response.status >= 400) {
 | 
			
		||||
                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();
 | 
			
		||||
        // try {
 | 
			
		||||
        uploadProgress.startDisplayTimer();
 | 
			
		||||
        core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
        const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
        // TODO: better management of non-retryable errors
 | 
			
		||||
        if (response._response.status >= 400) {
 | 
			
		||||
            throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
 | 
			
		||||
        }
 | 
			
		||||
        return response;
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										24
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -9838,23 +9838,15 @@ function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) {
 | 
			
		|||
            maxSingleShotSize: 128 * 1024 * 1024,
 | 
			
		||||
            onProgress: uploadProgress.onProgress()
 | 
			
		||||
        };
 | 
			
		||||
        try {
 | 
			
		||||
            uploadProgress.startDisplayTimer();
 | 
			
		||||
            core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
            const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
            // TODO: better management of non-retryable errors
 | 
			
		||||
            if (response._response.status >= 400) {
 | 
			
		||||
                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();
 | 
			
		||||
        // try {
 | 
			
		||||
        uploadProgress.startDisplayTimer();
 | 
			
		||||
        core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`);
 | 
			
		||||
        const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions);
 | 
			
		||||
        // TODO: better management of non-retryable errors
 | 
			
		||||
        if (response._response.status >= 400) {
 | 
			
		||||
            throw new errors_1.InvalidResponseError(`Upload failed with status code ${response._response.status}`);
 | 
			
		||||
        }
 | 
			
		||||
        return response;
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user