You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/06/22 21:22:29 UTC

[airflow] branch v2-1-test updated (e5efd1c -> 679c55d)

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

ash pushed a change to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git.


    from e5efd1c  Switch back temporarily to deprecated package registry (#16603)
     new 67d5b7a  Remove Shell scripts under ``airflow/www`` from releases (#16588)
     new e39dd46  Always install sphinx_airflow_theme from pypi (#16594)
     new 679c55d  Don't crash attempting to mask secrets in dict with non-string keys (#16601)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 MANIFEST.in                            |  1 +
 airflow/utils/log/secrets_masker.py    |  2 +-
 setup.py                               | 18 +-----------------
 tests/utils/log/test_secrets_masker.py |  3 +++
 4 files changed, 6 insertions(+), 18 deletions(-)

[airflow] 03/03: Don't crash attempting to mask secrets in dict with non-string keys (#16601)

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 679c55dc596dcc2d335473eb239080e3efafd62f
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Tue Jun 22 21:49:30 2021 +0100

    Don't crash attempting to mask secrets in dict with non-string keys (#16601)
    
    (cherry picked from commit 18cb0bbdbbb24e98ea8a944e97501a5657c88326)
---
 airflow/utils/log/secrets_masker.py    | 2 +-
 tests/utils/log/test_secrets_masker.py | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/airflow/utils/log/secrets_masker.py b/airflow/utils/log/secrets_masker.py
index 6775b18..4a254ac 100644
--- a/airflow/utils/log/secrets_masker.py
+++ b/airflow/utils/log/secrets_masker.py
@@ -76,7 +76,7 @@ def should_hide_value_for_key(name):
     """Should the value for this given name (Variable name, or key in conn.extra_dejson) be hidden"""
     from airflow import settings
 
-    if name and settings.HIDE_SENSITIVE_VAR_CONN_FIELDS:
+    if isinstance(name, str) and settings.HIDE_SENSITIVE_VAR_CONN_FIELDS:
         name = name.strip().lower()
         return any(s in name for s in get_sensitive_variables_fields())
     return False
diff --git a/tests/utils/log/test_secrets_masker.py b/tests/utils/log/test_secrets_masker.py
index 5d3b404..78a10b5 100644
--- a/tests/utils/log/test_secrets_masker.py
+++ b/tests/utils/log/test_secrets_masker.py
@@ -179,6 +179,8 @@ class TestSecretsMasker:
             ({"secret", "other"}, None, ["secret", "other"], ["***", "***"]),
             # We don't mask dict _keys_.
             ({"secret", "other"}, None, {"data": {"secret": "secret"}}, {"data": {"secret": "***"}}),
+            # Non string dict keys
+            ({"secret", "other"}, None, {1: {"secret": "secret"}}, {1: {"secret": "***"}}),
             (
                 # Since this is a sensitive name, all the values should be redacted!
                 {"secret"},
@@ -221,6 +223,7 @@ class TestShouldHideValueForKey:
             ("google_api_key", True),
             ("GOOGLE_API_KEY", True),
             ("GOOGLE_APIKEY", True),
+            (1, False),
         ],
     )
     def test_hiding_defaults(self, key, expected_result):

[airflow] 02/03: Always install sphinx_airflow_theme from pypi (#16594)

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit e39dd4649b8a10217051adddbc46a4a26750b4e7
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Tue Jun 22 20:14:59 2021 +0100

    Always install sphinx_airflow_theme from pypi (#16594)
    
    We don't need a way to specify _in_ setup.py that this should be
    installed from a GitHub release -- it's never needed by users, and if
    you are developing the theme you can install the custom version
    yourself.
    
    (The variable name is confusing too -- it wasn't pulling from git, but
    from a published release on GitHub.)
    
    Removing this just means one less thing to update.
    
    (cherry picked from commit 129fc61a06932175387175b4c2d7e57f00163556)
---
 setup.py | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/setup.py b/setup.py
index cefc104..49657eb 100644
--- a/setup.py
+++ b/setup.py
@@ -176,22 +176,6 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
         file.write(text)
 
 
-def get_sphinx_theme_version() -> str:
-    """
-    Return sphinx theme version. If USE_THEME_FROM_GIT env variable is set, the theme is used from
-    GitHub to allow dynamically update it during development. However for regular PIP release
-    you cannot use @ package specification, so the latest available released theme package from
-    PIP is used.
-    :return: Version of sphinx theme to use.
-    """
-    if os.environ.get('USE_THEME_FROM_GIT'):
-        return (
-            "@ https://github.com/apache/airflow-site/releases/download/0.0.4/"
-            + "sphinx_airflow_theme-0.0.4-py3-none-any.whl"
-        )
-    return ''
-
-
 # 'Start dependencies group' and 'Start dependencies group' are mark for ./scripts/ci/check_order_setup.py
 # If you change this mark you should also change ./scripts/ci/check_order_setup.py
 # Start dependencies group
@@ -258,7 +242,7 @@ deprecated_api = [
 doc = [
     # Sphinx is limited to < 3.5.0 because of https://github.com/sphinx-doc/sphinx/issues/8880
     'sphinx>=2.1.2, <3.5.0',
-    f'sphinx-airflow-theme{get_sphinx_theme_version()}',
+    'sphinx-airflow-theme',
     'sphinx-argparse>=0.1.13',
     'sphinx-autoapi==1.0.0',
     'sphinx-copybutton',

[airflow] 01/03: Remove Shell scripts under ``airflow/www`` from releases (#16588)

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 67d5b7a1cbd05ac53fb75f03a9cba4a73ea4b0aa
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Tue Jun 22 15:12:14 2021 +0100

    Remove Shell scripts under ``airflow/www`` from releases (#16588)
    
    We don't need the following files:
    
    - `airflow/www/compile_assets.sh`
    - `airflow/www/ask_for_recompile_assets_if_needed.sh`
    
    So we exclude them from sdist and wheel
    
    (cherry picked from commit 7af18ac856b470f91e75d419f27e78bc2a0b215b)
---
 MANIFEST.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MANIFEST.in b/MANIFEST.in
index eee29f8..9dcf610 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -30,6 +30,7 @@ graft airflow/config_templates
 recursive-exclude airflow/www/node_modules *
 global-exclude __pycache__  *.pyc
 exclude airflow/www/yarn.lock
+exclude airflow/www/*.sh
 include airflow/alembic.ini
 include airflow/api_connexion/openapi/v1.yaml
 include airflow/git_version