MaksYermak commented on code in PR #72809:
URL: https://github.com/apache/airflow/pull/72809#discussion_r4511493835


##########
providers/apache/beam/src/airflow/providers/apache/beam/hooks/beam.py:
##########
@@ -142,7 +142,7 @@ def process_fd(
     func_log = fd_to_log[fd]
 
     for line_raw in iter(fd.readline, b""):
-        line = line_raw.decode()
+        line = line_raw.decode(errors="replace")

Review Comment:
   @shahar1 I have updated the code



##########
providers/apache/beam/tests/unit/apache/beam/hooks/test_beam.py:
##########
@@ -441,6 +443,42 @@ def test_beam_wait_for_done_logging(self, mock_select, 
mock_popen, caplog):
         assert "apache-beam-stderr-3" in warn_messages
         assert "apache-beam-other-stderr" in warn_messages
 
+    @mock.patch("os.set_blocking")
+    @mock.patch("subprocess.Popen")
+    @mock.patch("select.select")
+    def test_run_beam_command_checks_job_id_by_name_on_timeout(
+        self, mock_select, mock_popen, mock_set_blocking
+    ):
+        fake_logger = MagicMock()

Review Comment:
   @shahar1 I have updated the code



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to