diff --git a/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml b/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml index ea3c92d8fb..83a4d334f2 100644 --- a/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml +++ b/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml @@ -1,20 +1,5 @@ - hosts: all tasks: - # Create unwritable /tmp/console-None.log - # This ensures that no further task can write to it without failing. - # A task trying to write to /tmp/console-None.log is considered broken - # because zuul_log_id is missing. - - name: Create unwritable /tmp/console-None.log - file: - path: /tmp/console-None.log - state: touch - mode: 0444 - # FIXME(tobiash): This is currently needed because the currently - # running zuul in OpenStack already shows this misbehavior and creates - # that file as root. So for now it is safe to ignore errors here. - # This should be removed once a fixed zuul is deployed. - failed_when: False - - name: Start zuul_console daemon zuul_console: - name: Create first file @@ -29,20 +14,3 @@ command: "cat {{ ansible_user_dir }}/command_test_file1" - name: Show contents of second file command: "cat {{ ansible_user_dir }}/command_test_file2" - - # Test a task with a handler - - name: Run a command with notifying a handler - command: /bin/true - notify: test handler - - handlers: - - name: test handler - command: echo "This is a handler" - -- hosts: all - strategy: free - tasks: - - name: Command task 1 within free strategy - command: echo "First free task" - - name: Command task 2 within free strategy - command: echo "Second free task" diff --git a/tests/remote/test_remote_zuul_stream.py b/tests/remote/test_remote_zuul_stream.py index 6aefdc6b46..10f834445f 100644 --- a/tests/remote/test_remote_zuul_stream.py +++ b/tests/remote/test_remote_zuul_stream.py @@ -95,14 +95,11 @@ class TestZuulStream(AnsibleZuulTestCase): 'controller \| ok: Runtime: \d:\d\d:\d\d\.\d\d\d\d\d\d', text) self.assertLogLine('TASK \[Show contents of second file\]', text) self.assertLogLine('controller \| command test two', text) - self.assertLogLine('controller \| This is a handler', text) - self.assertLogLine('controller \| First free task', text) - self.assertLogLine('controller \| Second free task', text) self.assertLogLine( 'controller \| ok: Runtime: \d:\d\d:\d\d\.\d\d\d\d\d\d', text) self.assertLogLine('PLAY RECAP', text) self.assertLogLine( - 'controller \| ok: \d+ changed: \d+ unreachable: 0 failed: 0', + 'controller \| ok: 5 changed: \d unreachable: 0 failed: 0', text) self.assertLogLine( 'RUN END RESULT_NORMAL: \[untrusted : review.example.com/' diff --git a/zuul/ansible/callback/zuul_stream.py b/zuul/ansible/callback/zuul_stream.py index 6c60ff62e1..9fdfca89cc 100644 --- a/zuul/ansible/callback/zuul_stream.py +++ b/zuul/ansible/callback/zuul_stream.py @@ -210,9 +210,6 @@ class CallbackModule(default.CallbackModule): if self._play.strategy != 'free': task_name = self._print_task_banner(task) - else: - task_name = task.get_name().strip() - if task.action in ('command', 'shell'): log_id = uuid.uuid4().hex task.args['zuul_log_id'] = log_id @@ -236,9 +233,6 @@ class CallbackModule(default.CallbackModule): streamer.start() self._streamers.append(streamer) - def v2_playbook_on_handler_task_start(self, task): - self.v2_playbook_on_task_start(task, False) - def _stop_streamers(self): self._streamers_stop = True while True: diff --git a/zuul/ansible/library/command.py b/zuul/ansible/library/command.py index 5a3538081e..3793881902 100755 --- a/zuul/ansible/library/command.py +++ b/zuul/ansible/library/command.py @@ -585,9 +585,6 @@ def main(): module.warn("As of Ansible 2.4, the parameter 'executable' is no longer supported with the 'command' module. Not using '%s'." % executable) executable = None - if not zuul_log_id: - module.fail_json(rc=256, msg="zuul_log_id missing: %s" % module.params) - if not args or args.strip() == '': module.fail_json(rc=256, msg="no command given")