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

Add warning and trace that res is dropped #1386

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from ansible.plugins.loader import callback_loader
from ansible.utils.display import Display

display = Display()

DOCUMENTATION = '''
callback: awx_display
Expand Down Expand Up @@ -213,7 +214,8 @@ def get_begin_dict(self):
if not omit_event_data and should_process_event_data:
max_res = int(os.getenv("MAX_EVENT_RES", "700000"))
if event not in ('playbook_on_stats',) and "res" in event_data and len(str(event_data['res'])) > max_res:
event_data['res'] = {}
display.warning(f"'res' in event data exceeds maximum allowed size ({max_res}), so it will be dropped")
event_data['res'] = {'msg': f"'res' in event data exceeded the maximum allowed size ({max_res}) and was dropped"}
else:
event_data = {}
event_dict['event_data'] = event_data
Expand Down
Loading