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

When AWS_ID is the placeholder value, act as though AWS not setup #13850

Merged
merged 2 commits into from
May 26, 2021

Conversation

djuber
Copy link
Contributor

@djuber djuber commented May 24, 2021

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

We have "Optional" as the placeholder in the .env_sample, if someone copied .env_sample to .env, they'd have AWS_ID present but not valid or meaningful.

When that's the "final" value in the .env file, assume we're actually going to use local storage instead.

~Because there are related guards around production mode this should have limited to no prod impact (outside of self-hosting, where I assume this is a net-improvement in usability). Forem clould has its own configuration. ~

I'm surprised this hadn't been a bigger problem.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Ensure AWS_ID= in your .env, then load the app

Change a user's profile image.
Ensure the new image is visible.

UI accessibility concerns?

None, this should be a develop/test only change.

Added tests?

  • Yes
  • No, and this is why: configuration change only.
  • I need help with writing tests

[Forem core team only] How will this change be communicated?

Will this PR introduce a change that impacts Forem members or creators, the
development process, or any of our internal teams? If so, please note how you
will share this change with the people who need to know about it.

  • This change does not need to be communicated, and this is why not: No one has noticed this, it seems like a bugfix for an unreported issue.

[optional] Are there any post deployment tasks we need to perform?

None

[optional] What gif best describes this PR or how it makes you feel?

smugly drinking coffee

We have "Optional" as the placeholder in the .env_sample

When that's the "final" value in the .env file, assume we're actually
going to use local storage instead.
@pr-triage pr-triage bot added the PR: draft bot applied label for PR's that are a work in progress label May 24, 2021
@djuber djuber marked this pull request as ready for review May 24, 2021 21:29
@djuber djuber requested a review from a team as a code owner May 24, 2021 21:29
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: draft bot applied label for PR's that are a work in progress labels May 24, 2021
@djuber djuber requested review from a team, joshpuetz and juliannatetreault and removed request for a team May 24, 2021 21:56
@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels May 24, 2021
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

Can we fix the problem at the source? "Optional" is just an arbitrary value that has been there for no particular reason, it could be "ABCDEF".

I don't think we should hardcode it (there's nowhere else where we look for that specific value in the code)

What if we change the .env_sample to default to nothing? Same as we did in #13767

Revert the change to the carrierwave initializer (don't hardcode the
placeholder value).

Mimics choices we made for Cloudinary in #13767
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels May 25, 2021
@jgaskins
Copy link
Contributor

jgaskins commented May 25, 2021

OMG, I replied on the wrong PR. Deleted comments to hide my shame.

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels May 26, 2021
@djuber djuber merged commit 682ea44 into main May 26, 2021
@djuber djuber deleted the djuber/carrierwave-ignore-placeholder-aws_id branch May 26, 2021 18:54
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants