Improve cache logging

This commit is contained in:
Daz DeBoer 2021-10-16 10:15:40 -06:00
parent 25672bf196
commit a94b9252d5
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
6 changed files with 14 additions and 8 deletions

2
dist/main/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/post/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -78,7 +78,9 @@ export class GradleUserHomeCache extends AbstractCache {
async beforeSave(): Promise<void> {
await this.reportGradleUserHomeSize('before saving common artifacts')
await this.saveArtifactBundles()
await this.reportGradleUserHomeSize('after saving common artifacts')
await this.reportGradleUserHomeSize(
'after saving common artifacts (./wrapper dir is not cached)'
)
}
private async saveArtifactBundles(): Promise<void> {
@ -202,7 +204,7 @@ export class GradleUserHomeCache extends AbstractCache {
}
)
core.info(`Gradle User Home cache entry (directories >5M): ${label}`)
core.info(`Gradle User Home (directories >5M): ${label}`)
core.info(
result.stdout

View file

@ -7,7 +7,9 @@ const BUILD_ROOT_DIR = 'BUILD_ROOT_DIR'
export async function restore(buildRootDirectory: string): Promise<void> {
if (isCacheDisabled()) {
core.debug('Cache read disabled')
core.info(
'Cache is disabled: will not restore state from previous builds.'
)
return
}
@ -22,7 +24,9 @@ export async function restore(buildRootDirectory: string): Promise<void> {
export async function save(): Promise<void> {
if (isCacheReadOnly()) {
core.debug('Cache is read-only: not saving cache entry')
core.info(
'Cache is read-only: will not save state for use in subsequent builds.'
)
return
}