Skip to content

Dev: Allow Minio to be used without debug mode #11272

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

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

hoyes
Copy link
Contributor

@hoyes hoyes commented Apr 11, 2024

The rclone setup currently assume that debug mode always implies using Minio.

Allow developers to test with debug mode disabled by making the S3_PROVIDER explicit in the docker_compose Django settings.

@hoyes hoyes requested a review from a team as a code owner April 11, 2024 13:24
@hoyes hoyes requested a review from stsewd April 11, 2024 13:24
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

Hi, we prefer to always have all settings defined. S3_PROVIDER should be defined in settings/base.py.

# we are running in DEBUG mode, use minio as provider.
if self.endpoint_url and settings.DEBUG:
provider = "minio"
provider = getattr(settings, "S3_PROVIDER", "AWS")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
provider = getattr(settings, "S3_PROVIDER", "AWS")
provider = settings.S3_PROVIDER

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, is now "AWS" in settings/base.py and "minio" in settings/docker_compose.py

The rclone setup currently assume that debug mode always implies
using Minio. Allow developers to test with debug mode disabled
by making the S3_PROVIDER explicit.

Set S3_PROVIDER to "AWS" in settings/base.py and "minio" in
settomgs/docker_compose.py

Signed-off-by: Peter Hoyes <[email protected]>
@stsewd stsewd merged commit d486011 into readthedocs:main Apr 15, 2024
7 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