-
Notifications
You must be signed in to change notification settings - Fork 147
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
Adds destination schema validation to job destinations #3242
Conversation
alishakawaguchi
commented
Feb 10, 2025
•
edited
Loading
edited
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3242 +/- ##
==========================================
+ Coverage 23.48% 23.61% +0.13%
==========================================
Files 378 379 +1
Lines 43489 43656 +167
==========================================
+ Hits 10215 10311 +96
- Misses 32229 32300 +71
Partials 1045 1045 ☔ View full report in Codecov by Sentry. |
Benchstat Geomean Results0.18% sec/op, -0.09% B/op, 0.00% allocs/op Benchstat results
|
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.
this is great and looks good too.
Can we get at least a basic integration test for this procedure as well?
<Skeleton className="w-full h-24 rounded-lg" /> | ||
)} | ||
{!isValidatingSchema && columnErrors && ( | ||
<div> |
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.
can this be refactored into a component?
!isValidateMappingsLoading && | ||
tableErrors.length > 0 && ( | ||
!isValidatingSchema && | ||
tableErrors && ( | ||
<div> |
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.
can this be refactored into a component?
@@ -1665,3 +1723,28 @@ func getJobSourceConnectionId(jobSource *mgmtv1alpha1.JobSource) (*string, error | |||
} | |||
return connectionIdToVerify, nil | |||
} | |||
|
|||
func getConnectionSchemaConfigByConnectionType(connection *mgmtv1alpha1.Connection) (*mgmtv1alpha1.ConnectionSchemaConfig, error) { |
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.
what is the purpose of this function? and why are all of the configs effectively just empty?
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.
only the SQL configs are empty. the document storage configs need jobId or jobRunId.
it's needed for the connection data builder GetSchema function.
GetSchema(ctx context.Context, config *mgmtv1alpha1.ConnectionSchemaConfig) ([]*mgmtv1alpha1.DatabaseColumn, error)
MysqlConfig: &mgmtv1alpha1.MysqlSchemaConfig{}, | ||
}, | ||
}, nil | ||
case *mgmtv1alpha1.ConnectionConfig_DynamodbConfig: |
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.
is this supported to be mssql?