Skip to content

Commit

Permalink
fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Dec 1, 2023
1 parent 29aa53a commit f780cfc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 20 deletions.
6 changes: 0 additions & 6 deletions flow/connectors/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@ func GetConnector(ctx context.Context, peer *protos.Peer) (Connector, error) {
return nil, fmt.Errorf("missing snowflake config for %s peer %s", peer.Type.String(), peer.Name)
}
return connsnowflake.NewSnowflakeConnector(ctx, sfConfig)
case protos.DBType_S3:
s3Config := peer.GetS3Config()
if s3Config == nil {
return nil, fmt.Errorf("missing s3 config for %s peer %s", peer.Type.String(), peer.Name)
}
return conns3.NewS3Connector(ctx, s3Config)
case protos.DBType_SQLSERVER:
sqlServerConfig := peer.GetSqlserverConfig()
if sqlServerConfig == nil {
Expand Down
2 changes: 1 addition & 1 deletion flow/connectors/eventhub/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (c *EventHubConnector) Close() error {
}

func (c *EventHubConnector) ConnectionActive() bool {
return c.pgMetadata.Ping()
return true
}

func (c *EventHubConnector) InitializeTableSchema(req map[string]*protos.TableSchema) error {
Expand Down
10 changes: 0 additions & 10 deletions flow/connectors/external_metadata/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ func NewPostgresMetadataStore(ctx context.Context, pgConfig *protos.PostgresConf
}, nil
}

func (p *PostgresMetadataStore) Ping() bool {
err := p.pool.Ping(p.ctx)
if err != nil {
log.Errorf("failed to connect to metadata db: %v", err)
return false
}

return true
}

func (p *PostgresMetadataStore) Close() error {
if p.pool != nil {
p.pool.Close()
Expand Down
3 changes: 1 addition & 2 deletions flow/connectors/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ func ValidCheck(s3Client *s3.S3, bucketURL string, metadataDB *metadataStore.Pos

func (c *S3Connector) ConnectionActive() bool {
_, listErr := c.client.ListBuckets(nil)
pinged := c.pgMetadata.Ping()
return listErr == nil && pinged
return listErr == nil
}

func (c *S3Connector) NeedsSetupMetadataTables() bool {
Expand Down
2 changes: 1 addition & 1 deletion nexus/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ impl NexusBackend {
} => {
let peer_type = peer.r#type;
if Self::is_peer_validity_supported(peer_type) {
self.validate_peer(peer).await.map_err(|e| {
self.validate_peer(peer_type,peer).await.map_err(|e| {
PgWireError::UserError(Box::new(ErrorInfo::new(
"ERROR".to_owned(),
"internal_error".to_owned(),
Expand Down

0 comments on commit f780cfc

Please sign in to comment.