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
Right now mark_as_read requires an absolute path to function correctly but file can use a relpath. The docs (until very recently) explain the desired usage pattern is something like file(mark_as_read('myfile.txt')). If we use a relpath for this then this has the opportunity to break!
The inconsistency of api for both mark_as_read vs file is a UX issue.
Example breaking code (ignore the lack of fileset here- I didn't write it!)
locals {
_all_files = split("\n", run_cmd("--terragrunt-quiet", "ls", "-p", "src"))
_all_files_marked = [for f in local._all_files : mark_as_read("src/${f}")]
}
Example that correctly marks as read:
locals {
_all_files = split("\n", run_cmd("--terragrunt-quiet", "ls", "-p", "src"))
_all_files_marked = [for f in local._all_files : mark_as_read(abspath("${get_terragrunt_dir()}/src/${f}"))]
}
Additional context
Flagged by a customer relying on tf files in their infrastructure live repo.
Describe the enhancement
Right now mark_as_read requires an absolute path to function correctly but file can use a relpath. The docs (until very recently) explain the desired usage pattern is something like file(mark_as_read('myfile.txt')). If we use a relpath for this then this has the opportunity to break!
The inconsistency of api for both mark_as_read vs file is a UX issue.
Example breaking code (ignore the lack of fileset here- I didn't write it!)
Example that correctly marks as read:
Additional context
Flagged by a customer relying on tf files in their infrastructure live repo.
Link to a Proof of Concept if you have one:
Including a PoC can help others understand the feature better and implement it faster.
RFC Not Needed
The text was updated successfully, but these errors were encountered: