Skip to content

Convert googleChat to artifact_processor (4-way split)#879

Merged
abrignoni merged 1 commit into
mainfrom
convert-googlechat
Jun 22, 2026
Merged

Convert googleChat to artifact_processor (4-way split)#879
abrignoni merged 1 commit into
mainfrom
convert-googlechat

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Converts the Google Chat (dynamite.db) artifact to LAVA @artifact_processor.

Change

  • The original emitted four reports with dynamic per-db names (Google Chat - Messages {identifier}, etc.). Split into four artifacts that consolidate all dynamite.db files into one table each, with a Source File discriminator column: get_googleChat (Messages), get_googleChat_groups (Groups), get_googleChat_drafts (Drafts), get_googleChat_users (Users).
  • The message annotation protobuf parsing (image attachments, meeting codes/URLs/sender) moved into a guarded _parse_annotation helper returning a fixed 8-field tuple, replacing the original bare try/except: pass chain.
  • Microsecond timestamps → timezone-aware UTC datetime columns.
  • Bug fix: the original ended with db.close (missing parentheses) — the DB was never actually closed, and it referenced db outside the loop (NameError-prone when no dynamite.db matched). Now each DB is opened/closed in a shared _run helper.

Verification

  • Compiles; pylint clean (-d C,R); all 4 header sets pass a live CREATE TABLE; names unique; PluginLoader 506 with all four functions.
  • Unit test of _parse_annotation (image / meeting / empty) and a dynamite.db fixture exercising all four reports: joins resolve, microsecond timestamps → aware UTC, annotation parsed, Source File appended.

Splits the single Google Chat ArtifactHtmlReport (4 dynamically-named
per-db reports) into four LAVA artifacts consolidating all dynamite.db
files with a Source File discriminator: get_googleChat (Messages),
get_googleChat_groups (Groups), get_googleChat_drafts (Drafts),
get_googleChat_users (Users).

- Message annotation protobuf parsing extracted into a guarded
  _parse_annotation helper (image / meeting / empty cases) instead of the
  bare try/except: pass chain.
- Microsecond timestamps -> aware UTC.
- Fixes the latent 'db.close' bug (missing parens -> the DB was never
  closed; also NameError-prone when no dynamite.db was found) via a shared
  _run helper that closes each db.
@abrignoni abrignoni merged commit f3bf622 into main Jun 22, 2026
2 checks passed
@abrignoni abrignoni deleted the convert-googlechat branch June 22, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant