fix(schema): suppress noisy tracebacks on schema validation errors#957
Conversation
|
Can you provide a before and after example? It almost sounds like you're saying this will suppress the details of a schema validation failure (ie: which fields failed to validate and why), which would not be desirable IMO. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #957 +/- ##
==========================================
+ Coverage 77.63% 77.72% +0.09%
==========================================
Files 130 130
Lines 12063 12137 +74
Branches 1476 1477 +1
==========================================
+ Hits 9365 9434 +69
- Misses 2309 2315 +6
+ Partials 389 388 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Before: After: The stacktrace adds no value and doesn't point to where the error is. The only part that is valuable there is the kind name and what the error was. |
|
I agree that the full stack trace doesn't have value. Is there a way we can preserve the printing of the full object that fails the validation while still avoiding printing the full stack? (Seeing the full object available can often help offer clues as to where or what is wrong.) |
|
Also good to note that schema violations were printing the stacktrace twice. |
|
Sorry, I omitted the [last] object printing on both cases there. It still prints on the new code, I just omitted for brevity. |
|
I wasn't able to verify your "after" situation. It looks like at least some types of schema validations are eaten with this patch :( : When applying the same local change to |
Schema violations are user-input/project errors, not taskgraph bugs, so the deep generator-chain traceback add no value in printing the traceback Introduce SchemaValidationError and have the kind loader and top-level CLI handler log just the message instead of printing a huge useless stacktrace.
04d9250 to
6130b57
Compare
Schema violations are user-input/project errors, not taskgraph bugs, so the deep generator-chain traceback add no value in printing the traceback.
Introduces SchemaValidationError and have the kind loader and top-level CLI handler log just the message instead of printing a huge useless stacktrace.