chainguard-dev / chainguard-dev/dfc

Invalidate cache if the version baked into CLI is newer

Open
#66 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.