Mute license warning when terms are accepted (#911)

With licensing changes in v6, a license warning was added to the logs
and job summary. Now, accepting the Build Scan Terms of Use or providing
a Develocity Access Key will mute this warning.
This commit is contained in:
Daz DeBoer
2026-03-24 08:46:15 -06:00
committed by GitHub
parent c2457a7fb2
commit f64284c333
11 changed files with 91 additions and 29 deletions
+8 -2
View File
@@ -68,8 +68,14 @@ export async function getCacheService(cacheConfig: CacheConfig): Promise<CacheSe
if (cacheConfig.isCacheDisabled()) {
return new NoOpCacheService()
}
const cacheService = await loadVendoredCacheService()
if (cacheConfig.isCacheLicenseAccepted()) {
return cacheService
}
await logCacheLicenseWarning()
return new LicenseWarningCacheService(await loadVendoredCacheService())
return new LicenseWarningCacheService(cacheService)
}
export async function loadVendoredCacheService(): Promise<CacheService> {
@@ -90,5 +96,5 @@ function findVendoredLibraryPath(): string {
}
export async function logCacheLicenseWarning(): Promise<void> {
console.warn(CACHE_LICENSE_WARNING)
console.info(CACHE_LICENSE_WARNING)
}