fix: Preventing parse errors in stack generation in worktrees - #5826
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughFilter exclusions, including negated filters from configuration and command-line arguments, are now propagated into git worktree sub-discoveries used for git-based filtering modes. Previously excluded catalog units inside worktrees are no longer discovered, preventing parse errors caused by missing stack generation context. Changes
Sequence Diagram(s)sequenceDiagram
participant Parent as Parent Discovery
participant Filter as Filter Component
participant Worktree as Worktree Sub-Discovery
participant Parser as Unit Parser
Parent->>Filter: Collect all filters (including negations)
Parent->>Filter: Extract non-git filters via ExcludingGitFilters()
Filter-->>Parent: Return non-git filters
Parent->>Worktree: Pass concatenated filters<br/>(parent non-git + worktree-specific)
Worktree->>Worktree: Apply combined filters to units
alt Unit matches negation filter
Worktree-->>Parser: Skip unit (excluded)
else Unit passes filters
Worktree->>Parser: Process unit
Parser-->>Worktree: Return parsed unit
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Comment |
Right now, users with negations in their filter expressions aren't preventing reading parsing from happening in worktrees during stack generation. This is because we aren't properly propagating the non-Git filters from the parent discovery down to child discoveries. This fix this by properly propagating the non-Git filters from the parent discovery down to child discoveries.
1282179 to
20a0ad7
Compare
| return refs | ||
| } | ||
|
|
||
| func collectWorktreeExpressions(expr Expression) []*GitExpression { |
There was a problem hiding this comment.
containsGitExpression and collectWorktreeExpressions share a lot of the same logic - can be room for deduplication
* fix: Preventing parse errors in stack generation in worktrees Right now, users with negations in their filter expressions aren't preventing reading parsing from happening in worktrees during stack generation. This is because we aren't properly propagating the non-Git filters from the parent discovery down to child discoveries. This fix this by properly propagating the non-Git filters from the parent discovery down to child discoveries. * fix: Adding some more testing for this * docs: Documenting fix * fix: Addressing lints
* chore: coverage scripts collection simplifications * chore: simplified code coverage scripts * chore: extracted common scripts in github action * chore: download cleanup * chore: set threshold to report coverage * chore: pr comments * docs: Adding a changelog (#5754) * docs: Updating docs dependencies * docs: Adding changelog in docs * docs: Fixing some styling * docs: Adding prior releases section * docs: Fixing links * docs: Adding changelog copy button (#5755) * docs: Updating docs dependencies * docs: Adding changelog in docs * docs: Fixing some styling * docs: Adding prior releases section * docs: Fixing links * docs: Adding changelog copy button * fix: Adding support for 'Unreleased' * docs: Adding more `v1.0.0` changelog docs (#5756) * chore: Adding tests to confirm #4395 is resolved (#5761) * fix: Fixing #5624 (#5766) * fix: Resetting config specific configurations when reading file * fix: Adjusting guards for dependency resolution * docs: Adding `v1.0.0` call out (#5768) * fix: add retry patterns for transient provider/registry network errors (#5779) * chore: updated retry patterns to reduce failing CICD tests * chore: changelog update * fix: Adding Windows symlink tip (#5778) * fix: Adding Windows Symlink tip * feat: Making tips adjustable * chore: Better error message for OpenTofu * fix: Reducing reliance on `opts` * fix: Addressing `lll` findings in relevant code nearby * chore: Using dependency injection to avoid the need to have a real Windows environment to test this * fix: Cleanup of messages * docs: Adding changelog entry for the tip * chore: default error detection simplification * chore: PR comments * vfs cleanup * cleanup * cleanup * docs cleanup * docs cleanup * cleanup --------- Co-authored-by: Yousif Akbar <11247449+yhakbar@users.noreply.github.com> * chore: Replace `runtime.NumCPU()` usage with `runtime.GOMAXPROCS(0)` (#5794) * chore: Replace `runtime.NumCPU()` usage with `runtime.GOMAXPROCS(0)` * docs: documenting logic for limits * docs: Adding changelog entry for runtime.NumCPU --> runtime.GOMAXPROCS update * various lint fixes (#5796) * update uses of os.IsNotExist to errors.Is * octal perms lint * lint fixes * fix calls to NewWorkTrees to match new signature * futher lints caused by errors.Is update * lint fixes --------- Co-authored-by: Denis O <denis.o@linux.com> * feat: add stack dependencies experiment (#5809) * feat: add stack dependencies experiment * docs: added basic changelog docs * docs: data update * docs update * docs: updated implementation plan * chore: Adding tip build workflows (#5823) * chore: Adding tip build workflows * docs: Documenting tip builds * docs: Cleaning up tip build docs * fix: Fixing script * fix: Addressing review feedback * fix: Cleaning up workflow scripts * docs: Clarifying codesign status * docs: Documenting tip/test build installation instructions (#5829) * fix: Fixing `get_original_terragrunt_dir()` interaction with dependencies (#5828) * fix: Fixing `get_original_terragrunt_dir()` * fix: Using better designed reset for dependency config path * fix: Better godocs * docs: Documenting fix in changelog * fix: Using cty.DynamicVal to avoid 'Unsupported Attribute' errors (#5827) * fix: Using cty.DynamicVal to avoid 'Unsupported Attribute' errors * fix: Adding more safety checks for dynamic values * docs: Documenting fix for `hcl validate` * fix: Addressing review feedback * fix: Preventing parse errors in stack generation in worktrees (#5826) * fix: Preventing parse errors in stack generation in worktrees Right now, users with negations in their filter expressions aren't preventing reading parsing from happening in worktrees during stack generation. This is because we aren't properly propagating the non-Git filters from the parent discovery down to child discoveries. This fix this by properly propagating the non-Git filters from the parent discovery down to child discoveries. * fix: Adding some more testing for this * docs: Documenting fix * fix: Addressing lints * docs: Adding TGS docs (#5831) * docs: Adding TGS docs * chore: Adding changelog entry * fix: Suppressing errors on Discord link * fix: Addressing review feedback * chore: Upgrading go deps (#5795) * chore: Upgrading go deps * fix: Addressing lints * fix: Fixing adapter * fix: Addressing lints * fix: Getting rid of teatest * fix: Addressing regressions from charm updates * fix: Disable git autoclrf to avoid issues with GOPROXY=direct * fix: Disable lfs for no proxy build * fix: Addressing #5828 feedback (#5876) * misc testing and lint updates (#5885) * disable gpg signing in repos made during tests * remove unnecessary exist check from delete helpers * remove redundant delete helpers, use helpers package * lint * fix: Fixing up lints (#5887) * chore: add 7-day cooldown to dependabot updates (#5889) Delay adoption of new releases across github-actions, gomod, and bun ecosystems to reduce exposure to supply chain attacks that are typically detected and yanked within days of publication. * feat: Adding `catalog-redesign` experiment (#5894) * chore: Updating install script to support tip builds (#5892) * chore: Adding tip build scripts to install * fix: Use jq for more reliable latest tip commit * chore: Adding tip notification system (#5895) * chore: simplified returned errors (#5664) * chore: tmpfs cleanup * chore: updated alert settings --------- Co-authored-by: Yousif Akbar <11247449+yhakbar@users.noreply.github.com> Co-authored-by: Travis Johnson <travis@thisguy.codes> Co-authored-by: Diógenes Fernandes <diofeher@gmail.com>
Description
Right now, users with negations in their filter expressions aren't preventing reading parsing from happening in worktrees during stack generation. This is because we aren't properly propagating the non-Git filters from the parent discovery down to child discoveries.
This fix this by properly propagating the non-Git filters from the parent discovery down to child discoveries.
Relates to recommended approach for handling #5821
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added / Removed / Updated [X].
Migration Guide
Summary by CodeRabbit