Code Monkey home page Code Monkey logo

Comments (5)

jedevc avatar jedevc commented on June 1, 2024 1

Is it expected in the future that changing secret values will in fact invalidate the cache?

I don't expect we'll change this behavior.

One of the reasons that would make this tricky is that the secret then becomes part of the cache key - this is kinda dangerous, even though the cache key is a sha256 digest. Potentially, it means that a leak of the cache key could allow brute-forcing the secret 😱

Is deleting the container the recommended flow?

At the moment, that's really the only option sadly 😢

I have suggested a new cache subcommand to control cache in the dagger engine: #6260. Is that kind of close to something that you'd be looking for?

from dagger.

taylormonacelli avatar taylormonacelli commented on June 1, 2024

Is deleting the container the recommended flow? I'm using this and then rerunning.

hello-dagger$ docker ps --format "{{.Names}}" --filter name='^/dagger-engine-*' | xargs --no-run-if-empty -I"{}" docker rm --force {}
hello-dagger$ export GH_SECRET='{ fix github_token here }'
hello-dagger$ dagger run go run ci/main.go

Is it expected in the future that changing secret values will in fact invalidate the cache?

I'm really loving what dagger is offering and looking forward to using it. Thanks a lot for providing this tool

from dagger.

helderco avatar helderco commented on June 1, 2024

The exception is when a secret is provided as input to a module with dagger call. Secrets from the CLI have a name that's based on the value.

from dagger.

marcosnils avatar marcosnils commented on June 1, 2024

At the moment, that's really the only option sadly 😢

@jedevc I think invalidating the cache via https://docs.dagger.io/cookbook/#invalidate-cache also works. Unless I'm missing something, I just did a test and when the cache gets invalidated before the With*Secret* calls, the secret gets effectively updated in the subsequent steps.

cc @taylormonacelli

from dagger.

taylormonacelli avatar taylormonacelli commented on June 1, 2024

At the moment, that's really the only option sadly 😢

@jedevc I think invalidating the cache via https://docs.dagger.io/cookbook/#invalidate-cache also works. Unless I'm missing something, I just did a test and when the cache gets invalidated before the With*Secret* calls, the secret gets effectively updated in the subsequent steps.

Yes using CACHEBUSTER variable works great, but having to add that explicitly for changing secrets is the problem because now you're always invalidating the cache when secret may have not changed.

from dagger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.