feat(s3): add S3_SKIP_POLICY env variable to disable setBucketPolicy by Deyvi-dev · Pull Request #1362 · EvolutionAPI/evolution-api · GitHub
Skip to content

feat(s3): add S3_SKIP_POLICY env variable to disable setBucketPolicy#1362

Merged
DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom
Deyvi-dev:develop
Apr 8, 2025
Merged

feat(s3): add S3_SKIP_POLICY env variable to disable setBucketPolicy#1362
DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom
Deyvi-dev:develop

Conversation

@Deyvi-dev
Copy link
Copy Markdown
Contributor

@Deyvi-dev Deyvi-dev commented Apr 7, 2025

Some S3-compatible providers like DigitalOcean Spaces do not support setting bucket policies via the MinIO client. This PR adds a conditional to skip this step when the provider does not support it.

Summary by Sourcery

Add an environment variable to conditionally skip setting bucket policies for S3-compatible storage providers that do not support this operation

New Features:

  • Introduce S3_SKIP_POLICY environment variable to allow skipping bucket policy configuration for incompatible S3 providers

Enhancements:

  • Modify S3 bucket creation process to conditionally set bucket policies based on environment configuration

@DavidsonGomes

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @Deyvi-dev - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider renaming S3_SKIP_POLICY to S3_SET_BUCKET_POLICY_ENABLED to avoid the double negative.
  • It might be helpful to add a log when the bucket policy is skipped, to make debugging easier.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@DavidsonGomes DavidsonGomes merged commit 09f79c9 into EvolutionAPI:develop Apr 8, 2025
1 check passed
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