Let's say I create a file on a cached volume attached to a Container in some Function.
How can I use that cached file in another Function without the cache getting garbage collected? I thought mounting the cache to the container it was created in before calling with_file would suffice but it seems not:
# backend_test_build populates the cache
backend = await self.backend_test_build(backend_dir)
jar_path = f"/build/libs/{consts.MONOLITH_JAR}"
jar_file =
backend.with_mounted_cache("/build", dag.cache_volume('build')).file(jar_path)
container.with_file("/build/libs/my.jar", jar_file)
I think the problem is that the Function is "cached" because its contents have not changed, so the cache eventually gets garbage collected.
When I terminal into the Container, forcing the Function to run, the problem goes away, like a heisenbug.
Do empty circles in the trace indicate skipped steps? In this trace you will see that several steps in the pipeline leading up to the failure are marked as such.