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

Fix amazon_s3.yml config for FILE_UPLOAD_STORAGE=filesystem #3909

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

mayorova
Copy link
Contributor

@mayorova mayorova commented Oct 7, 2024

What this PR does / why we need it:

This PR fixes a confusing behavior when FILE_UPLOAD_STORAGE is set to filesystem explicitly.
It's not "broken" in the product, because it's assumed that when this env var is empty, filesystem is used, and when it's s3, then S3 is used for storage.

But when FILE_UPLOAD_STORAGE=filesystem is set explicitly, the application isn't loaded, with the error:

/home/dmayorov/.asdf/installs/ruby/3.1.5/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:326:in `block in visit_Psych_Nodes_Alias': Unknown alias: filesystem (Psych::BadAlias)

because the amazon_s3.yml doesn't have a :filesystem alias.

There are some references that hint that filesystem is a potential valid value for FILE_UPLOAD_STORAGE:

so I made some changes in the example config to prevent this config from failing.

Which issue(s) this PR fixes

-none-

Verification steps

Run the app with FILE_UPLOAD_STORAGE=filesystem and make sure no errors are thrown and the storage is set correctly.

Special notes for your reviewer:

Copy link
Contributor

@akostadinov akostadinov left a comment

Choose a reason for hiding this comment

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

Good catch, nice!

@mayorova mayorova merged commit 4dbb1d6 into master Oct 8, 2024
17 of 21 checks passed
@mayorova mayorova deleted the fix-s3-confg branch October 8, 2024 11:30
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