mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 11:48:38 +08:00 
			
		
		
		
	Test fix-2099
This commit is contained in:
		
							parent
							
								
									f0946aba6c
								
							
						
					
					
						commit
						663bbaba2c
					
				
							
								
								
									
										45
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -6607,6 +6607,7 @@ const cacheTwirpClient = __importStar(__nccwpck_require__(5938)); | ||||||
| const config_1 = __nccwpck_require__(8924); | const config_1 = __nccwpck_require__(8924); | ||||||
| const tar_1 = __nccwpck_require__(2043); | const tar_1 = __nccwpck_require__(2043); | ||||||
| const constants_1 = __nccwpck_require__(8109); | const constants_1 = __nccwpck_require__(8109); | ||||||
|  | const http_client_1 = __nccwpck_require__(944); | ||||||
| class ValidationError extends Error { | class ValidationError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|  | @ -6643,8 +6644,18 @@ function checkKey(key) { | ||||||
|  * @returns boolean return true if Actions cache service feature is available, otherwise false |  * @returns boolean return true if Actions cache service feature is available, otherwise false | ||||||
|  */ |  */ | ||||||
| function isFeatureAvailable() { | function isFeatureAvailable() { | ||||||
|  |     const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); | ||||||
|  |     // Check availability based on cache service version
 | ||||||
|  |     switch (cacheServiceVersion) { | ||||||
|  |         case 'v2': | ||||||
|  |             // For v2, we need ACTIONS_RESULTS_URL
 | ||||||
|  |             return !!process.env['ACTIONS_RESULTS_URL']; | ||||||
|  |         case 'v1': | ||||||
|  |         default: | ||||||
|  |             // For v1, we only need ACTIONS_CACHE_URL
 | ||||||
|             return !!process.env['ACTIONS_CACHE_URL']; |             return !!process.env['ACTIONS_CACHE_URL']; | ||||||
|     } |     } | ||||||
|  | } | ||||||
| exports.isFeatureAvailable = isFeatureAvailable; | exports.isFeatureAvailable = isFeatureAvailable; | ||||||
| /** | /** | ||||||
|  * Restores cache from keys |  * Restores cache from keys | ||||||
|  | @ -6728,10 +6739,18 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|                 throw error; |                 throw error; | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // warn on cache restore failure and continue build
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -6807,9 +6826,17 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // Supress all non-validation cache related errors because caching should be optional
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (archivePath) { |                 if (archivePath) { | ||||||
|  | @ -6909,10 +6936,18 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -7005,10 +7040,18 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  |  | ||||||
							
								
								
									
										45
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -6607,6 +6607,7 @@ const cacheTwirpClient = __importStar(__nccwpck_require__(5938)); | ||||||
| const config_1 = __nccwpck_require__(8924); | const config_1 = __nccwpck_require__(8924); | ||||||
| const tar_1 = __nccwpck_require__(2043); | const tar_1 = __nccwpck_require__(2043); | ||||||
| const constants_1 = __nccwpck_require__(8109); | const constants_1 = __nccwpck_require__(8109); | ||||||
|  | const http_client_1 = __nccwpck_require__(944); | ||||||
| class ValidationError extends Error { | class ValidationError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|  | @ -6643,8 +6644,18 @@ function checkKey(key) { | ||||||
|  * @returns boolean return true if Actions cache service feature is available, otherwise false |  * @returns boolean return true if Actions cache service feature is available, otherwise false | ||||||
|  */ |  */ | ||||||
| function isFeatureAvailable() { | function isFeatureAvailable() { | ||||||
|  |     const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); | ||||||
|  |     // Check availability based on cache service version
 | ||||||
|  |     switch (cacheServiceVersion) { | ||||||
|  |         case 'v2': | ||||||
|  |             // For v2, we need ACTIONS_RESULTS_URL
 | ||||||
|  |             return !!process.env['ACTIONS_RESULTS_URL']; | ||||||
|  |         case 'v1': | ||||||
|  |         default: | ||||||
|  |             // For v1, we only need ACTIONS_CACHE_URL
 | ||||||
|             return !!process.env['ACTIONS_CACHE_URL']; |             return !!process.env['ACTIONS_CACHE_URL']; | ||||||
|     } |     } | ||||||
|  | } | ||||||
| exports.isFeatureAvailable = isFeatureAvailable; | exports.isFeatureAvailable = isFeatureAvailable; | ||||||
| /** | /** | ||||||
|  * Restores cache from keys |  * Restores cache from keys | ||||||
|  | @ -6728,10 +6739,18 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|                 throw error; |                 throw error; | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // warn on cache restore failure and continue build
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -6807,9 +6826,17 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // Supress all non-validation cache related errors because caching should be optional
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (archivePath) { |                 if (archivePath) { | ||||||
|  | @ -6909,10 +6936,18 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -7005,10 +7040,18 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  |  | ||||||
							
								
								
									
										45
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -6607,6 +6607,7 @@ const cacheTwirpClient = __importStar(__nccwpck_require__(5938)); | ||||||
| const config_1 = __nccwpck_require__(8924); | const config_1 = __nccwpck_require__(8924); | ||||||
| const tar_1 = __nccwpck_require__(2043); | const tar_1 = __nccwpck_require__(2043); | ||||||
| const constants_1 = __nccwpck_require__(8109); | const constants_1 = __nccwpck_require__(8109); | ||||||
|  | const http_client_1 = __nccwpck_require__(944); | ||||||
| class ValidationError extends Error { | class ValidationError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|  | @ -6643,8 +6644,18 @@ function checkKey(key) { | ||||||
|  * @returns boolean return true if Actions cache service feature is available, otherwise false |  * @returns boolean return true if Actions cache service feature is available, otherwise false | ||||||
|  */ |  */ | ||||||
| function isFeatureAvailable() { | function isFeatureAvailable() { | ||||||
|  |     const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); | ||||||
|  |     // Check availability based on cache service version
 | ||||||
|  |     switch (cacheServiceVersion) { | ||||||
|  |         case 'v2': | ||||||
|  |             // For v2, we need ACTIONS_RESULTS_URL
 | ||||||
|  |             return !!process.env['ACTIONS_RESULTS_URL']; | ||||||
|  |         case 'v1': | ||||||
|  |         default: | ||||||
|  |             // For v1, we only need ACTIONS_CACHE_URL
 | ||||||
|             return !!process.env['ACTIONS_CACHE_URL']; |             return !!process.env['ACTIONS_CACHE_URL']; | ||||||
|     } |     } | ||||||
|  | } | ||||||
| exports.isFeatureAvailable = isFeatureAvailable; | exports.isFeatureAvailable = isFeatureAvailable; | ||||||
| /** | /** | ||||||
|  * Restores cache from keys |  * Restores cache from keys | ||||||
|  | @ -6728,10 +6739,18 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|                 throw error; |                 throw error; | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // warn on cache restore failure and continue build
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -6807,9 +6826,17 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // Supress all non-validation cache related errors because caching should be optional
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (archivePath) { |                 if (archivePath) { | ||||||
|  | @ -6909,10 +6936,18 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -7005,10 +7040,18 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  |  | ||||||
							
								
								
									
										45
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -6607,6 +6607,7 @@ const cacheTwirpClient = __importStar(__nccwpck_require__(5938)); | ||||||
| const config_1 = __nccwpck_require__(8924); | const config_1 = __nccwpck_require__(8924); | ||||||
| const tar_1 = __nccwpck_require__(2043); | const tar_1 = __nccwpck_require__(2043); | ||||||
| const constants_1 = __nccwpck_require__(8109); | const constants_1 = __nccwpck_require__(8109); | ||||||
|  | const http_client_1 = __nccwpck_require__(944); | ||||||
| class ValidationError extends Error { | class ValidationError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|  | @ -6643,8 +6644,18 @@ function checkKey(key) { | ||||||
|  * @returns boolean return true if Actions cache service feature is available, otherwise false |  * @returns boolean return true if Actions cache service feature is available, otherwise false | ||||||
|  */ |  */ | ||||||
| function isFeatureAvailable() { | function isFeatureAvailable() { | ||||||
|  |     const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); | ||||||
|  |     // Check availability based on cache service version
 | ||||||
|  |     switch (cacheServiceVersion) { | ||||||
|  |         case 'v2': | ||||||
|  |             // For v2, we need ACTIONS_RESULTS_URL
 | ||||||
|  |             return !!process.env['ACTIONS_RESULTS_URL']; | ||||||
|  |         case 'v1': | ||||||
|  |         default: | ||||||
|  |             // For v1, we only need ACTIONS_CACHE_URL
 | ||||||
|             return !!process.env['ACTIONS_CACHE_URL']; |             return !!process.env['ACTIONS_CACHE_URL']; | ||||||
|     } |     } | ||||||
|  | } | ||||||
| exports.isFeatureAvailable = isFeatureAvailable; | exports.isFeatureAvailable = isFeatureAvailable; | ||||||
| /** | /** | ||||||
|  * Restores cache from keys |  * Restores cache from keys | ||||||
|  | @ -6728,10 +6739,18 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|                 throw error; |                 throw error; | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // warn on cache restore failure and continue build
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -6807,9 +6826,17 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // Supress all non-validation cache related errors because caching should be optional
 |                 // Supress all non-validation cache related errors because caching should be optional
 | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to restore: ${error.message}`); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|                     core.warning(`Failed to restore: ${error.message}`); |                     core.warning(`Failed to restore: ${error.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (archivePath) { |                 if (archivePath) { | ||||||
|  | @ -6909,10 +6936,18 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  | @ -7005,10 +7040,18 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||||
|             else if (typedError.name === ReserveCacheError.name) { |             else if (typedError.name === ReserveCacheError.name) { | ||||||
|                 core.info(`Failed to save: ${typedError.message}`); |                 core.info(`Failed to save: ${typedError.message}`); | ||||||
|             } |             } | ||||||
|  |             else { | ||||||
|  |                 // Log server errors (5xx) as errors, all other errors as warnings
 | ||||||
|  |                 if (typedError instanceof http_client_1.HttpClientError && | ||||||
|  |                     typeof typedError.statusCode === 'number' && | ||||||
|  |                     typedError.statusCode >= 500) { | ||||||
|  |                     core.error(`Failed to save: ${typedError.message}`); | ||||||
|  |                 } | ||||||
|                 else { |                 else { | ||||||
|                     core.warning(`Failed to save: ${typedError.message}`); |                     core.warning(`Failed to save: ${typedError.message}`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|  |  | ||||||
							
								
								
									
										9901
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										9901
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Bassem Dghaidi
						Bassem Dghaidi