Revert callback fixes
We suspect there are more fixes required, and the additional check these changes added may cause more harm in the interim. This reverts commit3512a5608c. This reverts commitd94a0d6f06. Change-Id: I6e874cd68a1cf6f974e36ab1870573bddf4e647b
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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/'
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user