#Two caching features: confusing?

1 messages ยท Page 1 of 1 (latest)

frozen oracle
#

๐Ÿงต

#

Two caching features: confusing?

bleak ore
#

re "volumes": might bring some confusion from docker run -v. Thinking about alternatives

frozen oracle
#

cc @night prairie @fossil isle in case you want to lurk ๐Ÿ™‚

#

Let me share a bad idea, which maybe can lead to a good idea ๐Ÿ™‚ What if instead of different directory types (TmpDir, CacheVolume, and plain Directory), each with their own WithMountxxx, we collapsed them all into Directory, and added configurable persistence properties to the Directory? Then depending on the persistence properties, we would use the right buildkit and/or sync low-level operations.

We have precedents for this (kind of):

  1. Directory vs. HostDirectory. Very different implementation, but used the same way. EG. there is no WithMountedHostDirectory

  2. CacheVolume concurrency flags.

What I'm proposing is to further generalize these precedents ๐Ÿ‘†

Then maybe instead of talking about "cache volumes" we're just talking about directories with special persistence options ("this directory should persist across runs")

#

Related idea: maybe these volumes/persisted directories are somehow tied to the "environment" which are currently defining with Zenith? Since we're facing the task of namespacing them into "environments" on the Cloud side also...

acoustic nova
frozen oracle
#

So like there's Host.Directory() maybe there's also Environment.Directory() or Environment.Volume() ?

frozen oracle
acoustic nova
#

more of a 'sync if possible' vs 'never sync'

frozen oracle
#

So the abstraction to achieve that I think is Environment (my working theory)

#

When you drop in Dagger Cloud, your environment is synchronized across engines. If you don't - it's not. But it still works the same, just with less cache hits

onyx wadi
#

instead of talking about "cache volumes" we're just talking about directories with special persistence options ("this directory should persist across runs")

I like that. The word "volume" is loaded from docker. A directory with a persistence setting is much clearer!

frozen oracle
#

But what I'm not sure is, what's the best way to explain the properties of the directory. Honestly I still get confused sometimes - which is what happened in the support discussion we had with Megan. I got confused about how those volumes interfere with the caching behavior

#

So we need terminology that gets to the essence