Skip to content

Commit 0a13e3d

Browse files
authored
fix: use sha256 generate persistent cache task id (#4295)
Signed-off-by: LunaWhispers <yangmuyucs@gmail.com>
1 parent 584a612 commit 0a13e3d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/compatibility-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141
skip: "Rate Limit | preheat files in cache"
4242
- module: client
4343
image: client
44-
image-tag: v1.0.12
44+
image-tag: v1.0.15
4545
chart-name: client
4646
skip: "Rate Limit"
4747
- module: seed-client
4848
image: client
49-
image-tag: v1.0.12
49+
image-tag: v1.0.15
5050
chart-name: seed-client
5151
skip: "Rate Limit"
5252

pkg/idgen/task_id.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,5 +189,5 @@ func TaskIDV2ByContent(content string) string {
189189

190190
// PersistentCacheTaskIDByContent generates persistent cache task id by content.
191191
func PersistentCacheTaskIDByContent(content string) string {
192-
return pkgdigest.CRC32FromStrings(content)
192+
return pkgdigest.SHA256FromStrings(content)
193193
}

pkg/idgen/task_id_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func TestPersistentCacheTaskIDbyContent(t *testing.T) {
219219
content: "This is a test file",
220220
expect: func(t *testing.T, d any) {
221221
assert := assert.New(t)
222-
assert.Equal(d, "107352521")
222+
assert.Equal(d, "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249")
223223
},
224224
},
225225
}

0 commit comments

Comments
 (0)