You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/27 19:01:06 UTC

[GitHub] [airflow] khalidmammadov opened a new pull request #19858: Skip masking airflow password for tests

khalidmammadov opened a new pull request #19858:
URL: https://github.com/apache/airflow/pull/19858


   Current "airflow" password gets masked whenever mentioned in the logs.
   This causes word "airflow" to be replaced with *** in the logs including folder path etc.
   
   This causes issue in some tests that read logs.  
   For example:
   Test case: **tests.cli.commands.test_task_command.TestLogsfromTaskRunCommand**
   It asserts for this value:
   ```
   "INFO - Running: ['airflow', 'tasks', 'run'...."
   but gets
   "INFO - Running: ['***', 'tasks', 'run'..."
   
   ```
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #19858:
URL: https://github.com/apache/airflow/pull/19858


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#issuecomment-980802740


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#discussion_r757817304



##########
File path: airflow/utils/log/secrets_masker.py
##########
@@ -47,6 +48,8 @@
 )
 """Names of fields (Connection extra, Variable key name etc.) that are deemed sensitive"""
 
+UNMASKED_SECRETS = {'airflow'}

Review comment:
       I'd call it explictly "SKIP_MASKING_FOR_TESTS"




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] khalidmammadov commented on pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
khalidmammadov commented on pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#issuecomment-980803045


   At the moment quarantine is set on a class/suite level and there are some other issues in those test. I will fix one by one and once complete we can remove quarantine flag.  


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#issuecomment-980802732


   Should we also un-quarantine the quarantined tests ?
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#discussion_r758264489



##########
File path: airflow/utils/log/secrets_masker.py
##########
@@ -232,11 +235,12 @@ def redact(self, item: "RedactableItem", name: Optional[str] = None) -> "Redacta
 
     def add_mask(self, secret: Union[str, dict, Iterable], name: str = None):
         """Add a new secret to be masked to this filter instance."""
+        test_mode = os.environ.get("AIRFLOW__CORE__UNIT_TEST_MODE")

Review comment:
       ```suggestion
           from airflow.configuration import conf
           
           test_mode: bool = conf.getboolean('core', 'unit_test_mode')
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#discussion_r757818587



##########
File path: airflow/utils/log/secrets_masker.py
##########
@@ -47,6 +48,8 @@
 )
 """Names of fields (Connection extra, Variable key name etc.) that are deemed sensitive"""
 
+UNMASKED_SECRETS = {'airflow'}

Review comment:
       or similar




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] khalidmammadov commented on a change in pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
khalidmammadov commented on a change in pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#discussion_r757819710



##########
File path: airflow/utils/log/secrets_masker.py
##########
@@ -47,6 +48,8 @@
 )
 """Names of fields (Connection extra, Variable key name etc.) that are deemed sensitive"""
 
+UNMASKED_SECRETS = {'airflow'}

Review comment:
       Renamed, any better?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #19858: Skip masking airflow password for tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #19858:
URL: https://github.com/apache/airflow/pull/19858#issuecomment-980803181


   Sounds good. @ashb - are you ok with that?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org