Publish reports #42

Merged
Gilles merged 1 commit from feat/22-publish-report into master 2026-10-29 22:20:44 +00:00
Owner

Closes #22

Monitoring plan, phase 5.

Changes

  • Report.ReportType.PUBLISH and apps/reports/parsers/publish.py: {"publish": {version, kind, date, artifacts, links, dependencies}}. Summary: headline version, kind (release / devel, default release), artifacts (name, size or null, URL), total_size, links (label defaults to the URL), dependency_count; report_date = the given date. A missing version is a processing error.
  • Dependencies (de-duplicated, sorted) go to the detail blob: GET /api/projects/<o>/<r>/reports/<id>/dependencies/ (read level), used by the version comparison (argus/frontend#28).
  • JSON upload accepts report_type=publish (wrapped as {"publish": …}).
  • prune_history never deletes publish reports (the release history).
  • "New version" alert = a new_report rule filtered on publish (test included); badge shows version | 1.2.0.
  • Upload storage fix (found by the tests): the report now records the key the storage actually used (default_storage.save()'s return value — it can differ when the key is taken), and every JSON body gets its own timestamped directory (S3 overwrites existing keys: a devel snapshot then a release of the same commit would have shared report.json). Extracted to _store_upload().
  • Migrations: choices only (reports 0010, events 0007). README, feature catalog; tests in apps/reports/test_publish.py.

Checks

pytest (240 passed), pylint 10/10, autopep8, bandit clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA

Closes #22 Monitoring plan, phase 5. ## Changes - `Report.ReportType.PUBLISH` and `apps/reports/parsers/publish.py`: `{"publish": {version, kind, date, artifacts, links, dependencies}}`. Summary: headline `version`, `kind` (release / devel, default release), artifacts (name, size or null, URL), `total_size`, links (label defaults to the URL), `dependency_count`; `report_date` = the given date. A missing version is a processing error. - Dependencies (de-duplicated, sorted) go to the detail blob: `GET /api/projects/<o>/<r>/reports/<id>/dependencies/` (read level), used by the version comparison (argus/frontend#28). - JSON upload accepts `report_type=publish` (wrapped as `{"publish": …}`). - `prune_history` never deletes publish reports (the release history). - "New version" alert = a `new_report` rule filtered on `publish` (test included); badge shows `version | 1.2.0`. - **Upload storage fix** (found by the tests): the report now records the key the storage actually used (`default_storage.save()`'s return value — it can differ when the key is taken), and every JSON body gets its own timestamped directory (S3 overwrites existing keys: a devel snapshot then a release of the same commit would have shared `report.json`). Extracted to `_store_upload()`. - Migrations: choices only (reports 0010, events 0007). README, feature catalog; tests in `apps/reports/test_publish.py`. ## Checks pytest (240 passed), pylint 10/10, autopep8, bandit clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
feature: publish reports (what a release or devel snapshot shipped)
All checks were successful
ci / test (pull_request) Successful in 3m34s
ci / e2e (pull_request) Has been skipped
ci / docker (pull_request) Has been skipped
ci / deploy (pull_request) Has been skipped
8517e91323
- New report type publish: version, kind (release/devel), date,
  artifacts (name, size, URL) and total size, links; the dependency
  list goes to the detail blob (GET .../reports/<id>/dependencies/).
- Sent as a file or as a JSON body; never pruned by the history
  retention. A new_report rule filtered on publish is the "new version"
  alert.
- Upload storage: the report now keeps the name the storage actually
  used (it may differ when a key is taken), and a JSON body always gets
  its own directory, so a devel snapshot and a release of the same
  commit never share a raw file.

Closes #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Author
Owner
<!-- argus-link-bot:argus/backend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/argus/backend/pr/42)
Gilles merged commit 3334f28462 into master 2026-10-29 22:20:44 +00:00
Gilles deleted branch feat/22-publish-report 2026-10-29 22:20:45 +00:00
Gilles referenced this pull request from a commit 2026-10-29 22:20:46 +00:00
Gilles referenced this pull request from a commit 2026-10-29 22:56:37 +00:00
Sign in to join this conversation.
No description provided.