Merge pull request #8614 from jctanner/COLLECTION_PLAYBOOK_STATS

analytics: include modified column and full event_data for playbook_on_stats

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-12-08 13:08:41 +00:00 committed by GitHub
commit 3aba1e9db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,14 +280,16 @@ def _copy_table(table, query, path):
return file.file_list()
@register('events_table', '1.1', format='csv', description=_('Automation task records'), expensive=True)
@register('events_table', '1.2', format='csv', description=_('Automation task records'), expensive=True)
def events_table(since, full_path, until, **kwargs):
events_query = '''COPY (SELECT main_jobevent.id,
main_jobevent.created,
main_jobevent.modified,
main_jobevent.uuid,
main_jobevent.parent_uuid,
main_jobevent.event,
main_jobevent.event_data::json->'task_action' AS task_action,
(CASE WHEN event = 'playbook_on_stats' THEN event_data END) as playbook_on_stats,
main_jobevent.failed,
main_jobevent.changed,
main_jobevent.playbook,