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

DEV: Remove gifsicle dependency #10357

Merged
merged 10 commits into from Oct 16, 2020
Merged

DEV: Remove gifsicle dependency #10357

merged 10 commits into from Oct 16, 2020

Conversation

@nbianca
Copy link
Member

@nbianca nbianca commented Aug 3, 2020

No description provided.

@discoursebot
Copy link

@discoursebot discoursebot commented Aug 3, 2020

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/uploaded-animated-gifs-of-4mb-or-larger-appear-very-small/147107/25

@xfalcox
Copy link
Member

@xfalcox xfalcox commented Aug 3, 2020

We should add a PSA to the announcements when we merge this.

@nbianca nbianca force-pushed the nbianca:gifs branch from c5cc790 to b59544d Aug 18, 2020
@tgxworld tgxworld added the ruby label Sep 1, 2020
@nbianca nbianca force-pushed the nbianca:gifs branch from b59544d to 90030f1 Oct 5, 2020
@nbianca nbianca requested a review from ZogStriP Oct 5, 2020
@nbianca
Copy link
Member Author

@nbianca nbianca commented Oct 5, 2020

This is ready now. FastImage v2.2.0 contains my additions to the gem.

Copy link
Member

@ZogStriP ZogStriP left a comment

LGTM 👍

Should definitely come with a PSA on meta as well 😉

nbianca added 6 commits Jul 7, 2020
@nbianca nbianca force-pushed the nbianca:gifs branch 3 times, most recently from 0f710e9 to d71da47 Oct 14, 2020
@nbianca nbianca requested a review from ZogStriP Oct 14, 2020
This commit simplifies the logic for rebaking animated GIF images and
moves it to a scheduled job (it was a once-off job before). The reason
for this change is to split the load of downloading and parsing every
GIF images over a longer time period. Also, it no longer recreates
uploads as a simple recreation of the optimized images is enough (these
are generally used).

def execute(args)
Upload
.where("original_filename LIKE '%.gif'")

This comment has been minimized.

@SamSaffron

SamSaffron Oct 15, 2020
Member

Should we use .where("extension = 'gif' or (extension is null AND original_filename like '%.gif' ")) ... gifs can sneak in with the wrong filename we rely on actual content I think.

This comment has been minimized.

@SamSaffron

SamSaffron Oct 15, 2020
Member

It can be null though in some cases

This comment has been minimized.

@nbianca

nbianca Oct 15, 2020
Author Member

That sounds like a good idea. 👍

RailsMultisite::ConnectionManagement.each_connection do |db|
puts "Backfilling #{db}..."
Upload
.where('original_filename LIKE \'%.gif\'')

This comment has been minimized.

@SamSaffron

SamSaffron Oct 15, 2020
Member

I recommend just instantiating the schedule here. no need to duplicate this code.

This comment has been minimized.

@nbianca

nbianca Oct 15, 2020
Author Member

I removed the backfilling Rake task completely. We do not need one now to force the process and we already have the scheduled job anyway. 😊

@SamSaffron
Copy link
Member

@SamSaffron SamSaffron commented Oct 15, 2020

hmmm if we are not using "animated" anywhere why bother backfilling now? I think once we actually use this column it makes sense to have a back filler ... but, is there any point doing this early?

nbianca added 2 commits Oct 15, 2020
@nbianca nbianca merged commit 43e52a7 into discourse:master Oct 16, 2020
8 checks passed
8 checks passed
PLUGINS-BACKEND
Details
CORE-BACKEND
Details
PLUGINS-FRONTEND
Details
CORE-FRONTEND
Details
PLUGINS-LINT
Details
CORE-LINT
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
license/cla Contributor License Agreement is signed.
Details
@nbianca nbianca deleted the nbianca:gifs branch Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.