I'm writing a custom script using Dagger python SDK like this
from sys import stderr
import anyio
import dagger
from dagger import dag
async def main():
async with dagger.Connection(dagger.Config(log_output=stderr)):
await (
dag.container()
.from_("alpine")
.with_mounted_cache("/cache-1", dag.cache_volume("cache-1"))
.with_mounted_cache("/cache-2", dag.cache_volume("cache-2"))
.with_exec(["ls"])
)
anyio.run(main)
This code is returning error in the attached file.
I tried removing a with_mounted_cache function call and it works. Like this
from sys import stderr
import anyio
import dagger
from dagger import dag
async def main():
async with dagger.Connection(dagger.Config(log_output=stderr)):
await (
dag.container()
.from_("alpine")
.with_mounted_cache("/cache-1", dag.cache_volume("cache-1"))
# .with_mounted_cache("/cache-2", dag.cache_volume("cache-2"))
.with_exec(["ls"])
)
anyio.run(main)
I'm not sure how to proceed with the debugging since the returning error doesn't tell much other than invalid graphql schema, but I have no idea what is invalid in this case. Any further pointer would be appreciated!