chainguard-dev / chainguard-dev/dfc
Invalidate cache if the version baked into CLI is newer
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 103
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
If we update the builtin-mappings.yaml file with new entries, it is not used by default if there is existing files inside the XDG_CACHE etc.
We should do something to either invalidate the cache based on timestamp, or something to prevent future travelers from being confused why mappings arent being applied during testing.
As a workaround, people can use the --mappings flag:
go run . --mappings pkg/dfc/builtin-mappings.yaml Dockerfile
Contributor guide
No contributing guide indexed for this repository
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 by tracing how the CLI loads cached mappings versus pkg/dfc/builtin-mappings.yaml, using the --mappings workaround as the comparison path. Determine how a changed built-in mappings version should invalidate existing XDG cache files, then verify that updated mappings are used without the flag and that existing cache behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100