perf: auto-file Gitea issues on pipeline step failure/skip and test failure/skip #213
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Pipeline step failures, skips, and test failures/skips were not automatically creating Gitea issues.
Solution
src/perf/hooks.py—on_step_failure(),on_step_skip(),pytest_runtest_logreport()on_step_failure()on any exceptiontests/conftest.py(gated bySTACK_FILE_TEST_ISSUESenv var)GiteaClient.create_issue()and label resolutionActivation
perfis installedSTACK_FILE_TEST_ISSUES=truein CI workflowsTests
11 tests covering:
Complete.
Created:
src/perf/hooks.py— 3 hooks:on_step_failure(step, exc, pipeline=)— files issue with traceback, labelsbug+pipelineon_step_skip(step, pipeline=, reason=)— files issue with skip reason, labelpipelinepytest_runtest_logreport(report)— fires on test failure/skip whenSTACK_FILE_TEST_ISSUES=trueModified:
src/aco/pipe/runner.py— wraps step execution in try/except, callson_step_failureon raisetests/conftest.py— importspytest_runtest_logreportfromperf.hooks(gated by ImportError)Tests: 11 in
test_hooks.py✅ 12,037 total passed, lint clean.