Skip to content

Commit

Permalink
Fix GCS endpoint and validation (#1449)
Browse files Browse the repository at this point in the history
GCS Peer validation seemingly has regressed, failing in UI peer
creation.
UI was setting the endpoint without the https prefix, and also this PR
removes listing buckets as part of validation for storage peers, as that
isn't an operation we do as part of mirrors.

Functionally tested with peer creation and functioning CDC mirror with
initial load

Co-authored-by: Kevin Biju <[email protected]>
  • Loading branch information
Amogh-Bharadwaj and heavycrystal authored Mar 8, 2024
1 parent 9c563b5 commit 487aea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions flow/connectors/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ func (c *S3Connector) Close() error {
}

func ValidCheck(ctx context.Context, s3Client *s3.Client, bucketURL string, metadataDB *metadataStore.PostgresMetadataStore) error {
_, listErr := s3Client.ListBuckets(ctx, nil)
if listErr != nil {
return fmt.Errorf("failed to list buckets: %w", listErr)
}

reader := strings.NewReader(time.Now().Format(time.RFC3339))

bucketPrefix, parseErr := utils.NewS3BucketAndPrefix(bucketURL)
Expand Down
3 changes: 2 additions & 1 deletion ui/components/PeerForms/S3Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const S3Form = ({ setter }: S3Props) => {
};

useEffect(() => {
const endpoint = storageType === 'S3' ? '' : 'storage.googleapis.com';
const endpoint =
storageType === 'S3' ? '' : 'https://storage.googleapis.com';
setter((prev) => {
return {
...prev,
Expand Down

0 comments on commit 487aea2

Please sign in to comment.