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

Remove bucket name from object path prefix #62

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

joao-zanutto
Copy link
Contributor

Current implementation is duplicating the bucket name in the object path prefix:
image

This PR removes the bucket name from the prefix, which was being unnecessarily added.

As a suggestion: I was thinking further on this and it would be nice to have a default path prefix definition that includes the db host and db name to avoid confusion in case one just decides to dump multiple database dumps into the same bucket without defining a prefix.

Something like:
STORAGE_S3_PREFIX / DB_HOSTNAME-DB_NAME / DUMP_ID
Where it would be possible to set another config value (ie. STORAGE_S3_PATH or some other naming to avoid confusion) to override the DB_HOSTNAME-DB_NAME string.

This would result in:

  • defining only the bucket would "just work" with logical separation of multiple databases in the same bucket
  • defining a prefix would be ideal for the use case where one does not have a bucket exclusively for Greenmask dumps, but still doesn't need to "manually" define prefixes for each database
  • possibility to override the the default path based on database/host if needed

@wwoytenko
Copy link
Contributor

You've got the right thoughts. @flazzarini raised conversation regarding the storage path in #56

@wwoytenko
Copy link
Contributor

Feel free to make a PR for this and consider the UX problem described in #56

@wwoytenko wwoytenko self-requested a review April 9, 2024 11:49
Copy link
Contributor

@wwoytenko wwoytenko left a comment

Choose a reason for hiding this comment

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

LGTM

@wwoytenko wwoytenko merged commit 3657f60 into GreenmaskIO:main Apr 9, 2024
15 checks 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