Skip to content

Commit 0ab9915

Browse files
ci: drop hardcoded CANN version from build cache key
Per review on #483: the cache key should not embed a CANN version string. The container's CANN version is already governed solely by the `image:` field of each job, so duplicating it in the key only creates a second source of truth that can drift (e.g. an image bump PR that forgets to update the key). When a forced cache invalidation is genuinely needed, bump the v2 -> v3 prefix instead. Removes the `cann8.5.0-` segment from all 5 cache keys (3 in pr-test-npu.yml, 2 in push_build_cache.yml). Both sides update in lockstep so push-side writes still match PR-side reads. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9ce2bf5 commit 0ab9915

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/pr-test-npu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
uses: runs-on/cache@v4
9595
with:
9696
path: output
97-
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a3-cann8.5.0-${{ steps.get_build_hash.outputs.BUILD_HASH }}
97+
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a3-${{ steps.get_build_hash.outputs.BUILD_HASH }}
9898

9999
- name: Install dependencies
100100
run: |
@@ -465,7 +465,7 @@ jobs:
465465
uses: runs-on/cache@v4
466466
with:
467467
path: output
468-
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a3-cann8.5.0-${{ steps.get_build_hash.outputs.BUILD_HASH }}
468+
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a3-${{ steps.get_build_hash.outputs.BUILD_HASH }}
469469

470470
- name: Install dependencies
471471
run: |
@@ -842,7 +842,7 @@ jobs:
842842
uses: runs-on/cache@v4
843843
with:
844844
path: output
845-
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a2-cann8.5.0-${{ steps.get_build_hash.outputs.BUILD_HASH }}
845+
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a2-${{ steps.get_build_hash.outputs.BUILD_HASH }}
846846

847847
- name: Install dependencies
848848
run: |

.github/workflows/push_build_cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: runs-on/cache@v4
4949
with:
5050
path: output
51-
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a3-cann8.5.0-${{ steps.get_build_hash.outputs.BUILD_HASH }}
51+
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a3-${{ steps.get_build_hash.outputs.BUILD_HASH }}
5252

5353
- name: Install dependencies
5454
if: steps.cache-build.outputs.cache-hit != 'true'
@@ -99,7 +99,7 @@ jobs:
9999
uses: runs-on/cache@v4
100100
with:
101101
path: output
102-
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a2-cann8.5.0-${{ steps.get_build_hash.outputs.BUILD_HASH }}
102+
key: sgl-kernel-npu-build-v2-${{ runner.os }}-a2-${{ steps.get_build_hash.outputs.BUILD_HASH }}
103103

104104
- name: Install dependencies
105105
if: steps.cache-build.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)