Skip to content

Commit d61cc58

Browse files
committed
debug
1 parent 95f09d2 commit d61cc58

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
strategy:
112112
matrix: ${{ fromJSON(needs.build.outputs.matrix) }}
113113
runs-on: ${{ matrix.os }}
114+
114115
steps:
115116
- uses: actions/checkout@v2
116117

src/LayerCache.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,15 @@ class LayerCache {
133133
}
134134
}
135135

136-
private async storeSingleLayerBy(id: string): Promise<number> {
137-
const path = this.genSingleLayerStorePath(id)
138-
const key = await this.generateSingleLayerSaveKey(id)
136+
private async storeSingleLayerBy(layerId: string): Promise<number> {
137+
const path = this.genSingleLayerStorePath(layerId)
138+
const key = await this.generateSingleLayerSaveKey(layerId)
139139

140-
core.info(`Start storing layer cache: ${key}`)
140+
core.info(`Start storing layer cache: ${JSON.stringify({ layerId, key })}`)
141141
const cacheId = await LayerCache.dismissError(cache.saveCache([path], key), LayerCache.ERROR_CACHE_ALREAD_EXISTS_STR, -1)
142-
core.info(`Stored layer cache, key: ${key}, id: ${cacheId}`)
142+
core.info(`Stored layer cache: ${JSON.stringify({ key, cacheId })}`)
143143

144+
core.debug(JSON.stringify({ log: `storeSingleLayerBy`, layerId, path, key, cacheId}))
144145
return cacheId
145146
}
146147

@@ -201,9 +202,12 @@ class LayerCache {
201202
}
202203

203204
private async restoreSingleLayerBy(id: string): Promise<string> {
204-
core.debug(JSON.stringify({ log: `restoreSingleLayerBy`, id }))
205+
const path = this.genSingleLayerStorePath(id)
206+
const key = await this.recoverSingleLayerKey(id)
207+
208+
core.debug(JSON.stringify({ log: `restoreSingleLayerBy`, id, path, key }))
205209

206-
const result = await cache.restoreCache([this.genSingleLayerStorePath(id)], await this.recoverSingleLayerKey(id))
210+
const result = await cache.restoreCache([path], key)
207211

208212
if (result == null) {
209213
throw new Error(`${LayerCache.ERROR_LAYER_CACHE_NOT_FOUND_STR}: ${JSON.stringify({ id })}`)

src/Tar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export function assertManifests(x: unknown): asserts x is Manifests {
1616
export async function loadRawManifests(path: string) {
1717
return (await fs.readFile(`${path}/manifest.json`)).toString()
1818
}
19+
1920
export async function loadManifests(path: string) {
2021
const raw = await loadRawManifests(path)
2122
const manifests = JSON.parse(raw.toString())

0 commit comments

Comments
 (0)