Is it supported to use filters on directories passed to a module as a constructor argument, rather than a function argument? It seems that if I do the following with the python SDK:
@object_type
class MyMod:
source: Annotated[dagger.Directory, Ignore(["*.bin"])]
@function
async def test(self) -> str:
ctr = dag.container().from_("alpine").with_mounted_directory("/src", self.source).with_exec(["ls", "/src"])
return await ctr.stdout()
And then dagger call --source . test with some-huge-binary.bin in the directory, dagger seems to hang forever at "parsing command line arguments", implying it isn't skipping said file. Meanwhile if I run:
@object_type
class MyMod:
@function
async def test(self, source: Annotated[dagger.Directory, Ignore(["*.bin"])]) -> str:
ctr = dag.container().from_("alpine").with_mounted_directory("/src", source).with_exec(["ls", "/src"])
return await ctr.stdout()
with dagger call test --source ., it runs very quickly and shows the filtered directory has been uploaded.
Is this working as intended? Or am I not doing it correctly?