Ship the resolved_role event data to analytics

This commit is contained in:
Alan Rominger 2022-04-18 11:42:19 -04:00
parent ba5361b25e
commit 1676c02611
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559

View File

@ -338,6 +338,7 @@ def _events_table(since, full_path, until, tbl, where_column, project_job_create
{tbl}.event,
task_action,
resolved_action,
resolved_role,
-- '-' operator listed here:
-- https://www.postgresql.org/docs/12/functions-json.html
-- note that operator is only supported by jsonb objects
@ -357,7 +358,7 @@ def _events_table(since, full_path, until, tbl, where_column, project_job_create
x.duration AS duration,
x.res->'warnings' AS warnings,
x.res->'deprecations' AS deprecations
FROM {tbl}, jsonb_to_record({event_data}) AS x("res" json, "duration" text, "task_action" text, "resolved_action" text, "start" text, "end" text)
FROM {tbl}, jsonb_to_record({event_data}) AS x("res" json, "duration" text, "task_action" text, "resolved_action" text, "resolved_role" text, "start" text, "end" text)
WHERE ({tbl}.{where_column} > '{since.isoformat()}' AND {tbl}.{where_column} <= '{until.isoformat()}')) TO STDOUT WITH CSV HEADER'''
return query