[P9] Auto-open Gitea issue on any CI build step failure #106

Closed
opened 2026-03-22 16:42:35 +00:00 by kert · 0 comments
Owner

Goal

Any build step failure in any pipeline (ci, deploy, infra-ci, rebuild-all) should automatically open a Gitea issue with:

  • Pipeline number and step name
  • Commit SHA and author
  • Last N lines of step log
  • Python traceback with git blame (if applicable)
  • Label: ci

Current state

api.diag already implements this logic. The report-failure step exists in ci.yml, deploy.yml, and infra-ci.yml but:

  • Uses when: status: [failure] which doesn't always trigger (#105)
  • Missing from rebuild-all.yml
  • Requires uv sync which adds ~10s overhead

Plan

  1. Fix report-failure triggering (#105)
  2. Add report-failure to rebuild-all.yml
  3. Add ci label ID to the issue creation in api.diag.__main__
  4. De-duplicate: check if an issue with the same title already exists before creating
  5. Consider lightweight alternative: use plugin-gitea-comment for PR feedback + api.diag for issue filing

Acceptance criteria

  • Every pipeline has a working report-failure step
  • Failed steps produce a Gitea issue with ci label
  • Duplicate issues are not created for repeated failures of the same step
## Goal Any build step failure in any pipeline (ci, deploy, infra-ci, rebuild-all) should automatically open a Gitea issue with: - Pipeline number and step name - Commit SHA and author - Last N lines of step log - Python traceback with git blame (if applicable) - Label: `ci` ## Current state `api.diag` already implements this logic. The `report-failure` step exists in ci.yml, deploy.yml, and infra-ci.yml but: - Uses `when: status: [failure]` which doesn't always trigger (#105) - Missing from rebuild-all.yml - Requires `uv sync` which adds ~10s overhead ## Plan 1. Fix report-failure triggering (#105) 2. Add report-failure to rebuild-all.yml 3. Add `ci` label ID to the issue creation in `api.diag.__main__` 4. De-duplicate: check if an issue with the same title already exists before creating 5. Consider lightweight alternative: use `plugin-gitea-comment` for PR feedback + `api.diag` for issue filing ## Acceptance criteria - [ ] Every pipeline has a working report-failure step - [ ] Failed steps produce a Gitea issue with `ci` label - [ ] Duplicate issues are not created for repeated failures of the same step
kert added this to the P9: CI/CD Unification milestone 2026-03-22 16:42:35 +00:00
kert added the ci label 2026-03-22 16:42:35 +00:00
kert closed this issue 2026-03-23 17:56:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#106