Skip to content

Commit 07a1d6f

Browse files
committed
fix(ci): fallback to full rebuild when cached codegraph DB is malformed (#708)
The impact workflow restores a cached .codegraph/ directory that can become corrupted. Added fallback: if incremental build fails, delete the cache and rebuild from scratch.
1 parent c5529b6 commit 07a1d6f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/codegraph-impact.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
path: .codegraph/
2929
key: codegraph-${{ hashFiles('src/**', 'package.json') }}
3030
restore-keys: codegraph-
31-
- run: npx codegraph build
31+
- name: Build codegraph
32+
run: npx codegraph build || (rm -rf .codegraph && npx codegraph build --no-incremental)
3233
- name: Run impact analysis
3334
run: |
3435
npx codegraph diff-impact --ref origin/${{ github.base_ref }} --json -T > impact.json || echo '{"affectedFiles":[],"summary":null}' > impact.json

0 commit comments

Comments
 (0)