feat: Expose error classifier#2539
Open
bbernays wants to merge 4 commits into
Open
Conversation
murarustefaan
approved these changes
Jul 16, 2026
murarustefaan
left a comment
Member
There was a problem hiding this comment.
I think this is good overall, but requesting a review from @erezrokah as well before merging.
There was a problem hiding this comment.
Pull request overview
This PR introduces a plugin-configurable error classification hook so resolver errors can be suppressed at the scheduler/plugin level (e.g., ignoring expected 404s) rather than handled in each resolver.
Changes:
- Added
schema.ErrorClassifier(+ supportingErrorEvent/ErrorPhase) and threaded it through scheduler/resolver execution paths. - Introduced
scheduler.WithErrorClassifier(...)and wired the classifier into DFS + shuffle-queue worker execution and resource-chunk resolution. - Added tests verifying default behavior (raised) vs suppressed behavior across strategies and resolver phases.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| schema/error_classifier.go | Adds the new public error-classifier API types and nil-safe helper. |
| scheduler/scheduler.go | Re-exports schema classifier types/phases and adds WithErrorClassifier. |
| scheduler/scheduler_shuffle_queue.go | Passes classifier into the shuffle-queue scheduler. |
| scheduler/scheduler_dfs.go | Consults classifier for table-resolver errors and passes it into chunk resolution. |
| scheduler/resolvers/resolvers.go | Adds classifier plumbing for chunk/column/pre/post resolver error handling. |
| scheduler/queue/scheduler.go | Adds option + field to carry classifier into queue workers. |
| scheduler/queue/worker.go | Consults classifier for table-resolver errors and passes it into chunk resolution. |
| scheduler/scheduler_error_classifier_test.go | Verifies scheduler-level suppression vs default SyncError emission across strategies. |
| scheduler/resolvers/resolvers_test.go | Updates existing resolver tests for new function signature. |
| scheduler/resolvers/error_classifier_test.go | Adds phase coverage tests ensuring suppression affects metrics and event metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
erezrokah
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR exposes a way for plugins to capture and classify errors at a plugin level rather than having to handle it on a per resolver basis.
For example this can be utilized in our AWS plugin to handle 404s or AWS specific errors without having to replace or wrap the error handling in every single table resolver
Example PR that uses this functionality: https://github.com/cloudquery/cloudquery-private/pull/13197