Skip to content

Convert mobileActivationLogs to artifact_processor (LAVA, context form)#1562

Merged
abrignoni merged 1 commit into
mainfrom
convert-mobileactivationlogs
Jun 23, 2026
Merged

Convert mobileActivationLogs to artifact_processor (LAVA, context form)#1562
abrignoni merged 1 commit into
mainfrom
convert-mobileactivationlogs

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

Solo conversion (complex — parses mobileactivationd.log and logs inside sysdiagnose_*.tar.gz archives).

Changes

  • Context single-arg form (def mobileActivationLogs(context):) — no unused args, pylint 10.00.
  • Timestamps stored as aware UTC (assume-UTC convention; this log has no local-time note) instead of naive str().
  • context.get_relative_path() applied to the returned source path(s) → LAVA shows clean in-extraction paths.
  • Dropped the low-value per-file 'counts' summary report ("Found N Upgrade entries…") — the events table is the actual forensic data; the counts are derivable from it.
  • Preserved the sysdiagnose tar extraction + the date/upgrade/startup regexes; hardened with try/except (ValueError) on the date parse, proper file/tar closing (the original leaked handles), and skipping unreadable files.
  • Dropped ArtifactHtmlReport/tsv/logfunc/logdevinfo/is_platform_windows/os.

Validation

  • ast.parse OK; 0 legacy refs; reserved-word audit clean.
  • pylint (CI config): 10.00/10.
  • Functional test on a fixture log: upgrade + startup events parsed with aware-UTC datetimes; non-matching lines skipped; source returned relative (logs/mobileactivationd.log).

Solo (complex: parses mobileactivationd.log + logs inside sysdiagnose tars).

- Context single-arg form (def mobileActivationLogs(context)); no unused args,
  pylint 10.00.
- Timestamps stored as aware UTC (assume-UTC convention; the log has no
  local-time note) instead of naive str().
- context.get_relative_path() applied to the returned source path(s) so LAVA
  shows clean in-extraction paths.
- Dropped the low-value per-file 'counts' summary report (Found N entries...);
  the events table is the actual forensic data and the counts are derivable.
- Preserve the sysdiagnose tar extraction + the date/upgrade/startup regexes;
  harden with try/except (ValueError) on the date parse, proper file/tar
  closing (was leaking handles), and skip unreadable files.
- Drop ArtifactHtmlReport/tsv/logfunc/logdevinfo/is_platform_windows/os.
@abrignoni abrignoni merged commit 0d0b432 into main Jun 23, 2026
1 check passed
@abrignoni abrignoni deleted the convert-mobileactivationlogs branch June 23, 2026 18:31
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