reproduce ignore rules inconsistency - #17641
Closed
jriddy wants to merge 1 commit into
Closed
Conversation
There's an inconsistency between patterns defined in .gitignore and patterns defined in pants_ignore for how the filesystem watcher is invalidating ignored paths. For paths only in .gitignore, if you `touch` that node, and the parent directory is not ignored, it still invalidates ongoing build graph steps. However, if this path is in pants_ignore, it is ignored properly. To reproduce on this branch, comment out the `#/ignored_dir` line from pants.toml and run the following command: ``` ./pants test \ --extra-env-vars=IGNORED_DIR="$(pwd)"/ignored_dir \ code_using_ignored_dir/test_writing_files.py ``` You'll see the test never complete because the `touch` inside the test invalidates the graph. Comment the line in pants.toml again, and re-run the command, and you'll see the test run fine. This is just a demo PR, it is not intended to be merged ever [ci skip-rust]
Contributor
Author
|
This seems to be related to the trailing slash notation in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's an inconsistency between patterns defined in .gitignore and
patterns defined in pants_ignore for how the filesystem watcher is
invalidating ignored paths. For paths only in .gitignore, if you
touchthat node, and the parent directory is not ignored, it stillinvalidates ongoing build graph steps. However, if this path is in
pants_ignore, it is ignored properly.
To reproduce on this branch, comment out the
#/ignored_dirlinefrom pants.toml and run the following command:
You'll see the test never complete because the
touchinside the testinvalidates the graph. Comment the line in pants.toml again, and re-run
the command, and you'll see the test run fine.
This is just a demo PR, it is not intended to be merged ever
[ci skip-rust]