-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates job mapping validator to return error codes #3179
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Benchstat Geomean Results0.43% sec/op, -0.03% B/op, 0.00% allocs/op Benchstat results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3179 +/- ##
==========================================
+ Coverage 27.82% 27.85% +0.02%
==========================================
Files 378 378
Lines 43259 43307 +48
==========================================
+ Hits 12037 12061 +24
- Misses 29772 29797 +25
+ Partials 1450 1449 -1 ☔ View full report in Codecov by Sentry. |
message ColumnError { | ||
// The schema of the table | ||
string schema = 1; | ||
// The table of the column | ||
string table = 2; | ||
// The column of the error | ||
string column = 3; | ||
// The list of errors | ||
// @deprecated - Use error_reports instead | ||
repeated string errors = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also worthwhile to add the [deprecated = true]
rpc option to anywhere that you are using @deprecated
internal/job/jobmapping-validator.go
Outdated
type JobMappingErrorCode string | ||
|
||
const ( | ||
TABLE_NOT_FOUND_IN_SOURCE JobMappingErrorCode = "TABLE_NOT_FOUND_IN_SOURCE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are great. so descriptive.
repeated string errors = 4; | ||
// The list of error reports | ||
repeated ErrorReport error_reports = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could potentially be more descriptive here and move the enum you described out of Go and into the proto layer so that you have high quality error code typings in the frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this is interesting, but does it make sense to have the ErrorReport specific to ColumnError
ColumnWarning
and DatabaseError
? From there you could describe even further scoped error codes that are relevant only to those? Maybe let's talk more about this if this makes sense.
No description provided.