Skip to content

sysShutdown: convert to @artifact_processor (closes out the LAVA conversion)#347

Merged
abrignoni merged 1 commit into
mainfrom
sysshutdown-lava-conversion
Jul 6, 2026
Merged

sysShutdown: convert to @artifact_processor (closes out the LAVA conversion)#347
abrignoni merged 1 commit into
mainfrom
sysshutdown-lava-conversion

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

sysShutdown.py was the last artifact with a legacy self-reporting body: it had __artifacts_v2__ metadata (using the old "function": "get_sysShutdown" key) but built its own ArtifactHtmlReport/tsv/timeline and produced no LAVA output. It slipped through the LAVA conversion sweep (#290#343). This converts it to the modern pattern, so every RLEAPP artifact is now on @artifact_processor.

Changes

  • Split the single function into two artifacts matching the two reports the legacy body already produced:
    • Sysdiagnose - Shutdown Log Processes — Timestamp / Entry Number / PID / Path / Source File
    • Sysdiagnose - Shutdown Log Reboots — Timestamp / Reboot Number / Source File
  • Both share one _parse_shutdown_log helper; the regex parsing logic is preserved verbatim (per-file entry/reboot numbering unchanged).
  • Context form (def x(context)), output_types: standard, returns (data_headers, data_list, source_path).
  • Timestamp column typed datetime, UTC via convert_ts_int_to_utc — drops the no-op convert_utc_human_to_timezone(..., 'UTC') wrap (already-UTC aware datetime).
  • Per-row Source File values stay extraction-relative via context.get_relative_path (preserves sysShutdown: shorten per-row Source File paths (follow-up to #345) #346 behavior); returned source_path is relativized centrally by the decorator (Report extraction-relative source paths from artifact_processor #345).
  • Preserves @KevinPagano3 attribution and the original 2024-02-13 creation date.

Validation

  • PYTHONPATH=. pylint --disable=C,R scripts/artifacts/sysShutdown.py10.00
  • PluginLoader smoke test: 313 plugins load (312 before; +1 net from the split), both specs resolve with callable methods
  • Fixture test via .__wrapped__ on a synthetic shutdown.log: UTC-aware timestamps, correct entry/reboot numbering across multiple SIGTERM blocks, relative Source File in every row
  • Reserved-word audit: timestamp, entry_number, pid, path, source_file, reboot_number — all safe

🤖 Generated with Claude Code

Closes out the RLEAPP LAVA conversion: sysShutdown had v2 metadata (legacy
'function' key) but a self-reporting body with no LAVA output. Split into
two artifact_processor artifacts matching the original reports —
Sysdiagnose - Shutdown Log Processes (Timestamp/Entry Number/PID/Path/
Source File) and Sysdiagnose - Shutdown Log Reboots (Timestamp/Reboot
Number/Source File) — sharing one verbatim parse helper.

- context form, output_types standard, Timestamp typed datetime (UTC via
  convert_ts_int_to_utc; drops the no-op convert_utc_human_to_timezone
  'UTC' wrap)
- per-row Source File stays extraction-relative via
  context.get_relative_path (preserves #346 behavior)
- preserves @KevinPagano3 attribution and 2024-02-13 creation date
- pylint --disable=C,R 10.00; loader 312 -> 313; fixture-tested via
  .__wrapped__ (per-file entry/reboot numbering unchanged)
@abrignoni abrignoni merged commit c909d00 into main Jul 6, 2026
@abrignoni abrignoni deleted the sysshutdown-lava-conversion branch July 6, 2026 20:18
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