You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like Buildkit returns weird results when you ReadDir with a glob like **/*.go. It actually seems to find everything recursively, but then trim each result to only have the first path segment. So for a/1.go a/2.go b/3.go it'll return a a b. We then recurse into a twice, which will also have this issue, so it quickly explodes into a huge number of results.
We could work around this issue by deduping, but it would probably be better to fix this upstream in Buildkit. It would be perfect if it just returned all the full paths, which it seems capable of doing. Then we wouldn't need to recurse ourselves. While we're there, maybe we could add support for exclude filters too (edit: interestingly it seems to support ! prefixes for exclusions - maybe we should be phasing out include: ["a"], exclude: ["b"] in favor of globs: ["a", "!b"]?).
What is the issue?
It looks like Buildkit returns weird results when you
ReadDir
with a glob like**/*.go
. It actually seems to find everything recursively, but then trim each result to only have the first path segment. So fora/1.go a/2.go b/3.go
it'll returna a b
. We then recurse intoa
twice, which will also have this issue, so it quickly explodes into a huge number of results.We could work around this issue by deduping, but it would probably be better to fix this upstream in Buildkit. It would be perfect if it just returned all the full paths, which it seems capable of doing. Then we wouldn't need to recurse ourselves. While we're there, maybe we could add support for exclude filters too (edit: interestingly it seems to support
!
prefixes for exclusions - maybe we should be phasing outinclude: ["a"], exclude: ["b"]
in favor ofglobs: ["a", "!b"]
?).cc @jedevc @TomChv for continuity from #5824 (comment)
Dagger version
v0.9.1+ (when the feature was added; not a regression)
Steps to reproduce
Log output
The text was updated successfully, but these errors were encountered: