From bab31017f2e3dd25b1fb3ebb35c6b309c4d7797b Mon Sep 17 00:00:00 2001 From: Daniel Ching Date: Fri, 30 Aug 2024 12:51:43 -0500 Subject: [PATCH 1/2] DOC: Demote logging about non-matching glob to warning The expand_globs function from conda_build.utils logs an ERROR when a glob expression returns no matches, this is overly alarming because the user may now use negative glob expressions which they don't care if it returns empty or the user may want to use the same set of glob expressions for multiple platforms some of which may return empty on some platforms. https://github.com/conda/conda-build/pull/5216 https://github.com/conda/conda-build/issues/5455 --- conda_build/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_build/utils.py b/conda_build/utils.py index 4b5fdcc8d2..eb8279d2b2 100644 --- a/conda_build/utils.py +++ b/conda_build/utils.py @@ -1275,7 +1275,7 @@ def expand_globs( glob_files = glob(path, recursive=True) if not glob_files: log = get_logger(__name__) - log.error(f"Glob {path} did not match in root_dir {root_dir}") + log.warning(f"Glob {path} did not match in root_dir {root_dir}") # https://docs.python.org/3/library/glob.html#glob.glob states that # "whether or not the results are sorted depends on the file system". # Avoid this potential ambiguity by sorting. (see #4185) From 1c147e8f7a3897eb6f32a3caec22c84ae9881e43 Mon Sep 17 00:00:00 2001 From: Daniel Ching <9604511+carterbox@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:20:35 -0600 Subject: [PATCH 2/2] Add news entry for #5472 --- news/5472-demote-non-mathing-glob-to-warning | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 news/5472-demote-non-mathing-glob-to-warning diff --git a/news/5472-demote-non-mathing-glob-to-warning b/news/5472-demote-non-mathing-glob-to-warning new file mode 100644 index 0000000000..17e2a93ff8 --- /dev/null +++ b/news/5472-demote-non-mathing-glob-to-warning @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* + +### Other + +* Demoted logging message about glob finding no matches from error to warning (#5472)