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

Added --s3.enable-tls flag #148

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Conversation

jcortejoso
Copy link
Contributor

@jcortejoso jcortejoso commented Sep 23, 2024

Changes proposed

Adding a new --s3.enable-tls command line flag to optionally enable SSL connection with the S3 endpoint.
Default value for the new flag is false to keep current behaviour.

I have tested with GCP GCS (--s3.endpoint=storage.googleapis.com), that requires a secure connection.

Screenshots (Optional)

Note to reviewers

server/config.go Outdated Show resolved Hide resolved
server/config.go Outdated
Comment on lines 326 to 331
&cli.BoolFlag{
Name: S3DisableTLSFlagName,
Usage: "whether to disable TLS for S3 storage",
Value: true,
EnvVars: prefixEnvVars("S3_DISABLE_TLS"),
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I personally don't like having a BoolFlag set to true by default, because then actually setting the flag --s3.disable-tls is useless, so the only flag config one would ever use is --s3.disable-tls=false which feels counterintuitive.

I'd personally prefer to flip to --s3.enable-tls, but @epociask wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to keep a similar syntax to --eigenda-disable-tls but it's true and logic your point. I'll follow your suggestion, and we can revert or change to something else if @epociask prefers in other way.

@jcortejoso jcortejoso changed the title Added --s3.disable-tls flag Added --s3.enable-tls flag Oct 1, 2024
Name: EnableTLSFlagName,
Usage: "enable TLS connection to S3 endpoint",
Value: false,
EnvVars: withEnvPrefix(envPrefix, "S3_ENABLE_TLS"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

WithEnvPrwrix adds the S3 prefix. Should be removed. Seems like we forgot to remove it on some other flags as well. Do you mind changing those as well?

@jcortejoso jcortejoso requested a review from samlaf October 2, 2024 17:22
Copy link
Collaborator

@epociask epociask left a comment

Choose a reason for hiding this comment

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

LGTM

@epociask epociask merged commit 92e61d3 into Layr-Labs:main Oct 2, 2024
5 checks passed
@jcortejoso jcortejoso deleted the jcortejoso/s3-tls-flag branch October 9, 2024 08:18
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.

3 participants