henry3260 commented on code in PR #58740:
URL: https://github.com/apache/airflow/pull/58740#discussion_r2567990150
##########
airflow-core/tests/unit/utils/test_file.py:
##########
@@ -189,6 +189,68 @@ def test_might_contain_dag_with_default_callable(self):
assert file_utils.might_contain_dag(file_path=file_path_with_dag,
safe_mode=True)
+ def test_airflowignore_negation_unignore_subfolder_file_glob(tmp_path):
+ """Ensure negation rules can unignore a subfolder and a file inside it
when using glob syntax.
+
+ Patterns:
+ * -> ignore everything
+ !subfolder/ -> unignore the subfolder (must match
directory rule)
+ !subfolder/keep.py -> unignore a specific file inside the
subfolder
Review Comment:
> I'm surprised that `subfolder/drop.py` is ignored. Could we add a
reference to the doc that indicates .gitignores or similar files work this way?
Sure thing! I will add the doc to the PR description.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]