#Do we have any change related to how
1 messages · Page 1 of 1 (latest)
Exporting the contents of a cache volume like that specifically never should have worked, are you saying that the artifacts function was returning a cache volume and worked with dagger export before?
No, it's not working as expected.
The issue is I can't see the cache content when I mount cache in to another container
it's empty
In general cache volumes are best effort only; buildkit is free to prune them at any time they aren't actively being used. So from one CLI invocation to another the cache volume could be pruned and emptied out. They shouldn't be used to create any sort of "persistent state". Is it required that cache volumes specifically be used for your use case here?
Yes, I know but in this case. cache is used in one of the containers it's not possible to prune. Also, v0.9.3 is working in this regard.
I use cache volumes for two reasons:
- keep cache and artifact data of github (it's okay to have best effort here)
- to access cache / artifact data end of the workflow execution to create output bundle to export them to host.
additional info here, i'm using copy and export hack to make this possible. The main issue in dev version it's not working but in v0.9.3 it is
I see, so there's no changes on main that I can think of that would have directly impacted this. But that general approach of copying the cache volume contents is inherently going to be somewhat flaky from what I can tell looking at the code link you posted above. So it's possible it's just coincidence that you're seeing different behavior on main vs v0.9.3.
Is there a way to avoid that entirely and instead just do something like have all the artifacts represented as File/Directory, which then get combined together into one directory for export? That would be best in general
maybe this inconsistency was created by two engines started by ./hack/dev from the dagger repo WDYT? I didn't see any inconsistency for the released version so far. However, I agree this is a hack, and can't rely on this completely.
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
298214a19925 localhost/dagger-engine.dev:latest "dagger-entrypoint.s…" 17 seconds ago Up 15 seconds dagger-engine.dev
792682ab4743 registry.dagger.io/engine:v0.9.3 "dagger-entrypoint.s…" About a minute ago Up About a minute dagger-engine-7b45c2238c1141a1
Is there a way to avoid that entirely and instead just do something like have all the artifacts represented as File/Directory, which then gets combined into one directory for export? That would be best in general
To avoid this, I need to directly access the service container after execution to retrieve the directory from the service. However, I'm unsure if it's possible to access the service directory or files directly.