feat: filter reported errors#70
Conversation
9867af6 to
929d49c
Compare
929d49c to
aa8cc6d
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces an “already reported” error sentinel and a filter to drop those sentinel-wrapped errors from the final CLI error output, aiming to reduce redundant/long error chains when errors have already been logged earlier in execution.
Changes:
- Add
WrapAsReported/FilterAlreadyReportedutilities (plus tests) to mark and filter “already reported” errors. - Wrap
Summary.allErrorsafter DAG summary logging, and filter the final CLI error before printing an error summary. - Rename stack dequeue API (
PopFront→PopBottom) and adjust BFS usage accordingly.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/errors/filter/drop.go | Implements sentinel wrapper + filtering logic over multierror trees. |
| pkg/errors/filter/drop_test.go | Adds tests for the filter behavior with nested and flat multierror inputs. |
| pkg/dag/status.go | Moves runner-status logging to an internal method and wraps Summary.allErrors as “already reported”. |
| pkg/dag/run.go | Uses summary.Log() and unexports executeNormal. |
| pkg/dag/run-concurrent.go | Uses summary.Log() and unexports executeConcurrent. |
| pkg/dag/execution-order.go | Updates BFS traversal to use PopBottom(). |
| pkg/common/stack/stack.go | Adds Top()/Bottom() helpers and renames bottom-pop API to PopBottom(). |
| pkg/common/stack/stack_test.go | Updates tests to match the new PopBottom() API. |
| pkg/cli/cmd/root/root.go | Removes ErrorSummary CLI/config setting. |
| pkg/cli/cli-impl.go | Filters already-reported errors before calling log.ErrorE(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
==========================================
+ Coverage 67.30% 67.59% +0.29%
==========================================
Files 116 117 +1
Lines 5389 5435 +46
==========================================
+ Hits 3627 3674 +47
- Misses 1440 1441 +1
+ Partials 322 320 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7733293 to
fc59bd0
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fc59bd0 to
36a6e05
Compare
Proposed Changes
errorfilter.FitlerReportedErrorsto reduce error chains.Used on
status.go::Log.Types of Changes
What types of changes does your contribution introduce? Put an
xin the boxesthat apply
bugfix.tag
feature.functionality to not work as expected). Use MR tag
feature.other choices apply). Use MR tag
chore.Checklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
CONTRIBUTING
guidelines.
Further Comments