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
Copy file name to clipboardExpand all lines: docs/src/data/changelog/v1.0.3/mark-many-as-read.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ version: "v1.0.3"
3
3
category: "experiments-added"
4
4
---
5
5
6
-
#### `mark-many-as-read` — Mark many files as read in one step
6
+
#### `mark-many-as-read`: mark many files as read in one step
7
7
8
8
Enable the new [`mark-many-as-read`](/reference/experiments) experiment to turn on two behaviors that each mark many files as read in a single call: automatic marking of files inside a local `terraform { source = "..." }` block, and the new `mark_glob_as_read` HCL function.
Copy file name to clipboardExpand all lines: docs/src/data/strict-controls/fast-copy.mdx
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,10 @@ name: fast-copy
3
3
status: active
4
4
---
5
5
6
-
Use a compile-once, single-walk implementation for `include_in_copy` and `exclude_from_copy`expansion when Terragrunt copies a module's source folder. Faster on large module sources because the walk no longer pre-expands every pattern in a separate pass per nested directory.
6
+
Switches `include_in_copy` and `exclude_from_copy`pattern matching from [zglob](https://pkg.go.dev/github.com/mattn/go-zglob) to [gobwas/glob](https://pkg.go.dev/github.com/gobwas/glob)when Terragrunt copies a module's source folder.
7
7
8
8
### `fast-copy` - Reason
9
9
10
-
`include_in_copy` and `exclude_from_copy` patterns have historically been expanded with [zglob](https://pkg.go.dev/github.com/mattn/go-zglob), once per pattern, with directory matches recursively re-expanded. On large source trees the pre-expansion can dominate the cost of the copy itself.
10
+
The default implementation runs zglob once per pattern and recursively re-expands every directory match, which can dominate copy time on large module sources. gobwas compiles each pattern once and matches inline during the existing copy walk.
11
11
12
-
Enabling `fast-copy` switches pattern matching to [gobwas/glob](https://pkg.go.dev/github.com/gobwas/glob), compiles each pattern once, and evaluates matches inline during the existing copy walk.
13
-
14
-
The semantics differ from zglob in one place worth knowing: gobwas does not collapse `**` when one of its neighbors is a wildcard. For example, `a/**/*.tf` matches `a/sub/main.tf` but not `a/main.tf`. Patterns that depended on zero-depth `**` collapsing should use brace alternation, for example `{*.tf,**/*.tf}`, to cover both depths.
12
+
gobwas does not collapse `**` when a neighbor is a wildcard, so `a/**/*.tf` matches `a/sub/main.tf` but not `a/main.tf`. Patterns that depended on zero-depth `**` collapsing need brace alternation like `{*.tf,**/*.tf}` to cover both depths.
// FastCopy opts into a compile-once, single-walk implementation of
84
-
// `include_in_copy` / `exclude_from_copy` expansion in
85
-
// `util.CopyFolderContents`. Faster on large module sources, but
86
-
// switches pattern matching from zglob to gobwas semantics.
83
+
// FastCopy is the control that switches `include_in_copy` and
84
+
// `exclude_from_copy` pattern matching from zglob to gobwas.
87
85
FastCopy="fast-copy"
88
86
)
89
87
@@ -298,7 +296,7 @@ func New() strict.Controls {
298
296
},
299
297
&Control{
300
298
Name: FastCopy,
301
-
Description: "Switches `include_in_copy` / `exclude_from_copy` expansion in `util.CopyFolderContents` to a compile-once, single-walk implementation. Pattern matching moves from zglob to gobwas semantics, so `**` no longer collapses when adjacent to a wildcard (for example `a/**/*.tf` will not match `a/foo.tf`). Use brace alternation such as `{*.tf,**/*.tf}` to cover both depths.",
299
+
Description: "Switches `include_in_copy` and `exclude_from_copy` pattern matching from zglob to gobwas. `**` no longer collapses when adjacent to a wildcard, so `a/**/*.tf` will not match `a/foo.tf`. Use brace alternation like `{*.tf,**/*.tf}` to cover both depths.",
0 commit comments