Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ansible-runner for openSUSE:Factory 
checked in at 2023-09-07 21:13:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ansible-runner (Old)
 and      /work/SRC/openSUSE:Factory/.ansible-runner.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ansible-runner"

Thu Sep  7 21:13:30 2023 rev:6 rq:1109445 version:2.3.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ansible-runner/ansible-runner.changes    
2023-06-01 17:19:24.518120636 +0200
+++ /work/SRC/openSUSE:Factory/.ansible-runner.new.1766/ansible-runner.changes  
2023-09-07 21:14:52.409879201 +0200
@@ -1,0 +2,8 @@
+Thu Sep  7 07:34:22 UTC 2023 - Johannes Kastl <ka...@b1-systems.de>
+
+- update to 2.3.4:
+  * [2.3 backport] Give more detail when we cannot process a
+    non-JSON streamed line (#1186) by @AlanCoding in
+    https://github.com/ansible/ansible-runner/pull/1258
+
+-------------------------------------------------------------------

Old:
----
  ansible-runner-2.3.3.tar.gz

New:
----
  ansible-runner-2.3.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ansible-runner.spec ++++++
--- /var/tmp/diff_new_pack.fmsz7m/_old  2023-09-07 21:14:53.457916665 +0200
+++ /var/tmp/diff_new_pack.fmsz7m/_new  2023-09-07 21:14:53.457916665 +0200
@@ -39,7 +39,7 @@
 %endif
 
 Name:           ansible-runner
-Version:        2.3.3
+Version:        2.3.4
 Release:        0
 Summary:        Run ansible-playbook inside an execution environment
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.fmsz7m/_old  2023-09-07 21:14:53.485917666 +0200
+++ /var/tmp/diff_new_pack.fmsz7m/_new  2023-09-07 21:14:53.485917666 +0200
@@ -1,5 +1,5 @@
 <services>
-  <service name="download_files" mode="disabled">
+  <service name="download_files" mode="manual">
   </service>
 </services>
 

++++++ ansible-runner-2.3.3.tar.gz -> ansible-runner-2.3.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-runner-2.3.3/ChangeLog 
new/ansible-runner-2.3.4/ChangeLog
--- old/ansible-runner-2.3.3/ChangeLog  2023-05-30 17:45:54.000000000 +0200
+++ new/ansible-runner-2.3.4/ChangeLog  2023-08-29 21:06:25.000000000 +0200
@@ -1,6 +1,11 @@
 CHANGES
 =======
 
+2.3.4
+-----
+
+* Give more detail when we cannot process a non-JSON streamed line (#1186) 
(#1258)
+
 2.3.3
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-runner-2.3.3/PKG-INFO 
new/ansible-runner-2.3.4/PKG-INFO
--- old/ansible-runner-2.3.3/PKG-INFO   2023-05-30 17:45:54.645141800 +0200
+++ new/ansible-runner-2.3.4/PKG-INFO   2023-08-29 21:06:26.759010000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ansible-runner
-Version: 2.3.3
+Version: 2.3.4
 Summary: "Consistent Ansible Python API and CLI with container and process 
isolation runtime capabilities"
 Home-page: https://ansible-runner.readthedocs.io
 Author: Ansible, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-runner-2.3.3/ansible_runner/streaming.py 
new/ansible-runner-2.3.4/ansible_runner/streaming.py
--- old/ansible-runner-2.3.3/ansible_runner/streaming.py        2023-05-30 
17:45:25.000000000 +0200
+++ new/ansible-runner-2.3.4/ansible_runner/streaming.py        2023-08-29 
21:05:37.000000000 +0200
@@ -333,8 +333,13 @@
             try:
                 line = self._input.readline()
                 data = json.loads(line)
-            except (json.decoder.JSONDecodeError, IOError):
-                self.status_callback({'status': 'error', 'job_explanation': 
'Failed to JSON parse a line from worker stream.'})
+            except (json.decoder.JSONDecodeError, IOError) as exc:
+                self.status_callback({
+                    'status': 'error',
+                    'job_explanation': (
+                        f'Failed to JSON parse a line from worker stream. 
Error: {exc} Line with invalid JSON data: {line[:1000]}'
+                    )
+                })
                 break
 
             if 'status' in data:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ansible-runner-2.3.3/ansible_runner.egg-info/PKG-INFO 
new/ansible-runner-2.3.4/ansible_runner.egg-info/PKG-INFO
--- old/ansible-runner-2.3.3/ansible_runner.egg-info/PKG-INFO   2023-05-30 
17:45:54.000000000 +0200
+++ new/ansible-runner-2.3.4/ansible_runner.egg-info/PKG-INFO   2023-08-29 
21:06:25.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ansible-runner
-Version: 2.3.3
+Version: 2.3.4
 Summary: "Consistent Ansible Python API and CLI with container and process 
isolation runtime capabilities"
 Home-page: https://ansible-runner.readthedocs.io
 Author: Ansible, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ansible-runner-2.3.3/ansible_runner.egg-info/pbr.json 
new/ansible-runner-2.3.4/ansible_runner.egg-info/pbr.json
--- old/ansible-runner-2.3.3/ansible_runner.egg-info/pbr.json   2023-05-30 
17:45:54.000000000 +0200
+++ new/ansible-runner-2.3.4/ansible_runner.egg-info/pbr.json   2023-08-29 
21:06:25.000000000 +0200
@@ -1 +1 @@
-{"git_version": "0393c39", "is_release": true}
\ No newline at end of file
+{"git_version": "c311e81", "is_release": false}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ansible-runner-2.3.3/ansible_runner.egg-info/requires.txt 
new/ansible-runner-2.3.4/ansible_runner.egg-info/requires.txt
--- old/ansible-runner-2.3.3/ansible_runner.egg-info/requires.txt       
2023-05-30 17:45:54.000000000 +0200
+++ new/ansible-runner-2.3.4/ansible_runner.egg-info/requires.txt       
2023-08-29 21:06:25.000000000 +0200
@@ -3,4 +3,6 @@
 python-daemon
 pyyaml
 six
+
+[:(python_version < '3.10')]
 importlib-metadata<6.3,>=4.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ansible-runner-2.3.3/test/integration/test_transmit_worker_process.py 
new/ansible-runner-2.3.4/test/integration/test_transmit_worker_process.py
--- old/ansible-runner-2.3.3/test/integration/test_transmit_worker_process.py   
2023-05-30 17:45:25.000000000 +0200
+++ new/ansible-runner-2.3.4/test/integration/test_transmit_worker_process.py   
2023-08-29 21:05:37.000000000 +0200
@@ -459,11 +459,15 @@
         _output=outgoing_buffer,
         private_data_dir=worker_dir,
     )
-    sent = outgoing_buffer.getvalue()
-    assert b'"status": "error"' in sent
+    outgoing_buffer.seek(0)
+    sent = outgoing_buffer.readline()
+    data = json.loads(sent)
+    assert data['status'] == 'error'
+    assert data['job_explanation'] == 'Failed to extract private data 
directory on worker.'
+    assert data['result_traceback']
 
 
-def test_unparsable_private_dir_worker(tmp_path):
+def test_unparsable_line_worker(tmp_path):
     worker_dir = tmp_path / 'for_worker'
     worker_dir.mkdir()
     incoming_buffer = io.BytesIO(b'')
@@ -476,18 +480,27 @@
         _output=outgoing_buffer,
         private_data_dir=worker_dir,
     )
-    sent = outgoing_buffer.getvalue()
-    assert b'"status": "error"' in sent
+    outgoing_buffer.seek(0)
+    sent = outgoing_buffer.readline()
+    data = json.loads(sent)
+    assert data['status'] == 'error'
+    assert data['job_explanation'] == 'Failed to JSON parse a line from 
transmit stream.'
 
 
-def test_unparsable_private_dir_processor(tmp_path):
+def test_unparsable_really_big_line_processor(tmp_path):
     process_dir = tmp_path / 'for_process'
     process_dir.mkdir()
-    incoming_buffer = io.BytesIO(b'')
+    incoming_buffer = io.BytesIO(bytes(f'not-json-data with extra 
garbage:{"f"*10000}', encoding='utf-8'))
+
+    def status_receiver(status_data, runner_config):
+        assert status_data['status'] == 'error'
+        assert 'Failed to JSON parse a line from worker stream.' in 
status_data['job_explanation']
+        assert 'not-json-data with extra garbage:ffffffffff' in 
status_data['job_explanation']
+        assert len(status_data['job_explanation']) < 2000
 
-    processor = run(
+    run(
         streamer='process',
         _input=incoming_buffer,
         private_data_dir=process_dir,
+        status_handler=status_receiver
     )
-    assert processor.status == 'error'

Reply via email to