-
Notifications
You must be signed in to change notification settings - Fork 97
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
Better peer checks #572
Better peer checks #572
Conversation
d04193f
to
f780cfc
Compare
@@ -141,8 +141,8 @@ func ValidCheck(s3Client *s3.S3, bucketURL string, metadataDB *metadataStore.Pos | |||
} | |||
|
|||
func (c *S3Connector) ConnectionActive() bool { | |||
_, err := c.client.ListBuckets(nil) | |||
return err == nil | |||
_, listErr := c.client.ListBuckets(nil) |
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 doesn't seem like a strong enough check for the connection being active.
Something along the lines of the ValidCheck
function seems better, the bucket seems to be constant anyway.
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.
The ValidCheck function is performed as part of validation
async fn validate_peer<'a>(&self, peer: &Peer) -> anyhow::Result<()> { | ||
//if flow handler does not exist, skip validation | ||
if self.flow_handler.is_none() { | ||
return Ok(()); |
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.
Should this always happen? A lot of our peer types are not usable from the query layer and having flow not validate them doesn't seem strong enough.
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 Eventhub and Eventhub Group are not covered by our validation API
If Snowflake/BigQuery are using an external stage, |
9051209
to
0c445bd
Compare
Fixes #482
Fixes #484
Also checks for dataset existence for BQ Peer. (This will also be applicable to UI)