Always cache miss even the debug message show it is cached
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Thank you 🙇♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.
- If you have found a security issue please submit it here
- If you have questions about writing workflows or action files, then please visit the GitHub Community Forum's Actions Board
- If you are having an issue or question about GitHub Actions then please contact customer support
If your issue is relevant to this repository, please include the information below:
Describe the bug
Debug logs - https://github.com/korandoru/setup-zig/actions/runs/4869953462/jobs/8685391245
Related code:
const toolPath = cache.find('zig', versionSpec, targetPlatform)
if (toolPath) {
core.info(`Cache hit ${toolPath}`)
core.addPath(toolPath)
return
}
// ...
const cachedToolPath = await cache.cacheDir(extractedPath, 'zig', versionSpec, targetPlatform)
core.info(`Cache new ${cachedToolPath}`)
core.addPath(cachedToolPath)
But after rerun the workflow it always report cache miss.
To Reproduce
See the debug logs above.
Expected behavior
Should properly hit cache.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cache.find and cache.cacheDir calls shown in the issue and inspect the linked debug logs for the cache key, version, and target platform values. Re-run the referenced workflow after tracing those inputs; done means a second run reports a cache hit and reuses the cached Zig tool path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100