Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project updates do not run against hosts #14832

Conversation

chrismeyersfsu
Copy link
Member

@chrismeyersfsu chrismeyersfsu commented Feb 1, 2024

SUMMARY

The project update event has no host_id or host_name because they only run on localhost.

The recent change to self.host_map over in the callback caused this failure to surface. #14825

This change also fixes the collection CI failures.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API
AWX VERSION

ADDITIONAL INFORMATION

The bug presents during a project update.

tools_awx_1 | 2024-02-01 16:17:17,619 ERROR    [-] awx.main.commands.run_callback_receiver Callback Task Processor Raised Unexpected Exception processing event data:
tools_awx_1 | {'uuid': '9fcb72a1-6302-4795-9692-69d1f772f86d', 'counter': 4, 'stdout': '', 'start_line': 4, 'end_line': 4, 'runner_ident': '18', 'event': 'runner_on_start', 'project_update_id': 18, 'pid': 10, 'created': '2024-02-01T16:17:17.538479+00:00', 'event_data': {'playbook': 'project_update.yml', 'playbook_uuid': '17e040ad-445e-47af-a1f5-1d1444dd32ed', 'play': 'Update source tree if necessary', 'play_uuid': 'b6d7a3cb-c991-261b-23e3-000000000002', 'play_pattern': 'localhost', 'task': 'Update project using git', 'task_uuid': 'b6d7a3cb-c991-261b-23e3-000000000006', 'task_action': 'ansible.builtin.git', 'resolved_action': 'ansible.builtin.git', 'task_args': '', 'task_path': '/runner/project/project_update.yml:41', 'host': 'localhost', 'uuid': '9fcb72a1-6302-4795-9692-69d1f772f86d', 'guid': '98fa4718e4794e94b261ad8e8b797483'}, 'job_created': '2024-02-01 16:17:16.186108+00:00', 'host_name': 'localhost'}
tools_awx_1 | Traceback (most recent call last):
tools_awx_1 |   File "/awx_devel/awx/main/dispatch/worker/callback.py", line 268, in perform_work
tools_awx_1 |     event = cls.create_from_data(**body)
tools_awx_1 |   File "/awx_devel/awx/main/models/events.py", line 454, in create_from_data
tools_awx_1 |     event = cls(**kwargs)
tools_awx_1 |   File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/models/base.py", line 556, in __init__
tools_awx_1 |     _setattr(self, prop, value)
tools_awx_1 | AttributeError: can't set attribute

* The project update event has no host_id or host_name because they
  only run on localhost.
@chrismeyersfsu chrismeyersfsu force-pushed the fix-collection-ci-project-delete-wtf branch from 8481633 to 6b778a5 Compare February 1, 2024 18:58
@chrismeyersfsu chrismeyersfsu changed the title noop Project updates do not run against hosts Feb 1, 2024
@fosterseth fosterseth merged commit 2fa5116 into ansible:devel Feb 1, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants