Skip to content
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

S3 Peer UI #668

Merged
merged 9 commits into from
Nov 17, 2023
Merged

S3 Peer UI #668

merged 9 commits into from
Nov 17, 2023

Conversation

Amogh-Bharadwaj
Copy link
Contributor

@Amogh-Bharadwaj Amogh-Bharadwaj commented Nov 16, 2023

Screenshot 2023-11-16 at 1 33 12 PM
  • Upon choosing the GCS option, the Region and Role ARN fields will not be shown as they have fixed values for GCS

@@ -85,6 +93,48 @@ func (c *S3Connector) Close() error {
return nil
}

func ValidCheck(s3Client *s3.S3, bucketUrl string, metadataDB *metadataStore.PostgresMetadataStore) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
ST1003: func parameter bucketUrl should be bucketURL (stylecheck)

return fmt.Errorf("failed to list buckets: %w", listErr)
}

reader := strings.NewReader("hello world")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put something like a timestamp string

bucketName := aws.String(bucketPrefix.Bucket)
_, putErr := s3Client.PutObject(&s3.PutObjectInput{
Bucket: bucketName,
Key: aws.String("peerdb_check"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this a const in the file and call it __peerdb_check

"github.com/aws/aws-sdk-go/service/s3"
log "github.com/sirupsen/logrus"
)

const (
CHECK_OBJECT_KEY = "peerdb_check"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
ST1003: should not use ALL_CAPS in Go names; use CamelCase instead (stylecheck)

Comment on lines +55 to +62
metadataDb: {
host: '',
port: 5432,
user: 'postgres',
password: '',
database: 'postgres',
transactionSnapshot: '',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't expose metadata db to the user, just use catalog.

@iskakaushik iskakaushik merged commit 4a72fea into main Nov 17, 2023
9 checks passed
@iskakaushik iskakaushik deleted the ui-s3-peer branch November 17, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants