This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5abdb7bab78 Provide default for EXCLUDED_PROVIDERS lookup. (#43385)
5abdb7bab78 is described below

commit 5abdb7bab7821b6f9d39eebdb006710a14874df6
Author: perry2of5 <[email protected]>
AuthorDate: Fri Oct 25 10:24:10 2024 -0700

    Provide default for EXCLUDED_PROVIDERS lookup. (#43385)
    
    The current code throws a KeyError when the environment variable
    EXCLUDED_PROVIDERS is not defind. This commit adds an empty map
    as a default to prevent this failure.
---
 scripts/in_container/is_provider_excluded.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/in_container/is_provider_excluded.py 
b/scripts/in_container/is_provider_excluded.py
index 2eac93dac06..fe0e0da4871 100755
--- a/scripts/in_container/is_provider_excluded.py
+++ b/scripts/in_container/is_provider_excluded.py
@@ -23,7 +23,7 @@ import os
 from in_container_utils import console
 
 if __name__ == "__main__":
-    excluded_providers = json.loads(os.environ["EXCLUDED_PROVIDERS"])
+    excluded_providers = json.loads(os.environ.get("EXCLUDED_PROVIDERS", "{}"))
     extra = os.environ["EXTRA"]
     console.print(f"[bright_blue]Check if provider {extra} is excluded in 
{excluded_providers}")
     python_version = os.environ["PYTHON_MAJOR_MINOR_VERSION"]

Reply via email to