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 2022/09/30 16:27:49 UTC

[GitHub] [airflow] ashb opened a new pull request, #26806: Fix running debuggers inside `airflow tasks test`

ashb opened a new pull request, #26806:
URL: https://github.com/apache/airflow/pull/26806

   Fixes #26802
   
   As part of 2.3.3 we added redaction to output from the tasks test
   command, but unfortunately that broke using a debugger with this error:
   
   ```
     File "/usr/lib/python3.10/pdb.py", line 262, in user_line
       self.interaction(frame, None)
     File "/home/ash/.virtualenvs/airflow/lib/python3.10/site-packages/pdb.py", line 231, in interaction
       self._cmdloop()
     File "/usr/lib/python3.10/pdb.py", line 322, in _cmdloop
       self.cmdloop()
     File "/usr/lib/python3.10/cmd.py", line 126, in cmdloop
       line = input(self.prompt)
   TypeError: 'NoneType' object cannot be interpreted as an integer
   ```
   
   (ipdb has a similar but different error)
   
   The "fix" is to assign a fileno attribute to the object. `input()` needs
   this to write the prompt. It feels like a "bug" that it doesn't work
   without it, but as this class is only used in `tasks test` this is a
   safe change
   
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ 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 changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).


-- 
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] dstandish commented on a diff in pull request #26806: Fix running debuggers inside `airflow tasks test`

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #26806:
URL: https://github.com/apache/airflow/pull/26806#discussion_r984800812


##########
tests/utils/log/test_secrets_masker.py:
##########
@@ -363,3 +365,13 @@ def test_write(self, capsys):
         RedactedIO().write(p)
         stdout = capsys.readouterr().out
         assert stdout == "***"
+
+    def test_input_builtin(self, monkeypatch):
+        """
+        Test that when redirect is inplace the `input()` builtin works.

Review Comment:
   ```suggestion
           Test that when redirect is in place the `input()` builtin works.
   ```



-- 
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 merged pull request #26806: Fix running debuggers inside `airflow tasks test`

Posted by GitBox <gi...@apache.org>.
ashb merged PR #26806:
URL: https://github.com/apache/airflow/pull/26806


-- 
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