Skip to content

codeintel: state-change reason for lsif uploads audit logs

Administrator requested to merge nsc/lsif-uploads-auditlog-improvement into main

Created by: Strum355

> select record_deleted_at, upload_id as id, transition_columns, reason from lsif_uploads_audit_logs order by log_timestamp desc;
       record_deleted_at       | id |                                                                                                                                                   transition_columns                                                                                                                                                    |       reason       
-------------------------------+----+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"deleted\", \"old\"=>\"deleting\", \"column\"=>\"state\""}                                                                                                                                                                                                                                                  | non-visible upload
 NULL                          | 27 | {"\"new\"=>\"completed\", \"old\"=>\"processing\", \"column\"=>\"state\""}                                                                                                                                                                                                                                              | 
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"deleting\", \"old\"=>\"completed\", \"column\"=>\"state\""}                                                                                                                                                                                                                                                | overlapping upload
 NULL                          | 27 | {"\"new\"=>\"2022-01-10 17:07:41+00\", \"old\"=>NULL, \"column\"=>\"committed_at\""}                                                                                                                                                                                                                                    | 
 NULL                          | 27 | {"\"new\"=>\"processing\", \"old\"=>\"queued\", \"column\"=>\"state\"","\"new\"=>\"archlinux\", \"old\"=>\"\", \"column\"=>\"worker_hostname\""}                                                                                                                                                                        | 
 NULL                          | 27 | {"\"new\"=>\"uploading\", \"old\"=>NULL, \"column\"=>\"state\"","\"new\"=>\"false\", \"old\"=>NULL, \"column\"=>\"expired\"","\"new\"=>\"0\", \"old\"=>NULL, \"column\"=>\"num_resets\"","\"new\"=>\"0\", \"old\"=>NULL, \"column\"=>\"num_failures\"","\"new\"=>\"\", \"old\"=>NULL, \"column\"=>\"worker_hostname\""} | 
 NULL                          | 27 | {"\"new\"=>\"queued\", \"old\"=>\"uploading\", \"column\"=>\"state\""}                                                                                                                                                                                                                                                  | 
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"completed\", \"old\"=>\"processing\", \"column\"=>\"state\""}                                                                                                                                                                                                                                              | 
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"2022-01-10 17:07:41+00\", \"old\"=>NULL, \"column\"=>\"committed_at\""}                                                                                                                                                                                                                                    | 
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"processing\", \"old\"=>\"queued\", \"column\"=>\"state\"","\"new\"=>\"archlinux\", \"old\"=>\"\", \"column\"=>\"worker_hostname\""}                                                                                                                                                                        | 
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"queued\", \"old\"=>\"uploading\", \"column\"=>\"state\""}                                                                                                                                                                                                                                                  | 
 2022-04-28 17:44:55.360428+00 | 26 | {"\"new\"=>\"uploading\", \"old\"=>NULL, \"column\"=>\"state\"","\"new\"=>\"false\", \"old\"=>NULL, \"column\"=>\"expired\"","\"new\"=>\"0\", \"old\"=>NULL, \"column\"=>\"num_resets\"","\"new\"=>\"0\", \"old\"=>NULL, \"column\"=>\"num_failures\"","\"new\"=>\"\", \"old\"=>NULL, \"column\"=>\"worker_hostname\""} | 

Test plan

yes, I did 🙂

Merge request reports

Loading