YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
84 stars 33 forks source link

Mastodon 4.1 issues - still blurhash related? #367

Closed panomaki closed 1 year ago

panomaki commented 1 year ago

4.1.0 install problems

So I've been spending some time trying to move forward to get 4.1.0 working, unfortunately without full success. Sharing this issue anyways to help others move this forward (or help me).

I've run these tests on a clean yunohost development Virtualbox (11.1.6.2).

So, the ci-auto-update version (without the blurhash patch [#361] crashes out with the exact same error mentioned there. After reapplying the patch (ci-auto-update is behind on #361 and #362) , it still fails:

2023-02-13 15:39:11,581: WARNING - You are trying to install in deployment mode after changing
2023-02-13 15:39:11,582: WARNING - your Gemfile. Run `bundle install` elsewhere and add the
2023-02-13 15:39:11,583: WARNING - updated Gemfile.lock to version control.
2023-02-13 15:39:11,583: DEBUG - 
2023-02-13 15:39:11,583: WARNING - If this is a development machine, remove the /var/www/mastodon/live/Gemfile freeze
2023-02-13 15:39:11,584: WARNING - by running `bundle config unset deployment`.
2023-02-13 15:39:11,584: DEBUG - 
2023-02-13 15:39:11,584: WARNING - Bundler is unlocking ruby
2023-02-13 15:39:11,585: DEBUG - 
2023-02-13 15:39:11,585: WARNING - You have added to the Gemfile:
2023-02-13 15:39:11,587: WARNING - * blurhash (~> 0.1)
2023-02-13 15:39:11,587: DEBUG - 
2023-02-13 15:39:11,587: WARNING - You have deleted from the Gemfile:
2023-02-13 15:39:11,588: WARNING - * blurhash
2023-02-13 15:39:11,588: DEBUG - + ynh_exit_properly
2023-02-13 15:39:11,588: DEBUG - + local exit_code=16
2023-02-13 15:39:11,589: DEBUG - + '[' 16 -eq 0 ']'
2023-02-13 15:39:12,090: DEBUG - + ynh_clean_setup
2023-02-13 15:39:12,090: DEBUG - + true
2023-02-13 15:39:13,099: ERROR - Unable to install mastodon: An error occurred inside the app installation script

It appears applying the patch wasn't succesful, Even after I tried to recreate it from the original mastodon/mastodon sources it still fails with one Hunk, but I can't figure out where it's going wrong:

2023-02-13 15:36:31,111: DEBUG - patching file Gemfile
2023-02-13 15:36:31,112: DEBUG - patching file Gemfile.lock
2023-02-13 15:36:31,112: DEBUG - Hunk #2 FAILED at 125.
2023-02-13 15:36:31,112: DEBUG - Hunk #3 succeeded at 772 (offset -1 lines).
2023-02-13 15:36:31,112: DEBUG - 1 out of 3 hunks FAILED -- saving rejects to file Gemfile.lock.rej

I'm probably just no good in creating the appropriate diff (or to solve the Gem-issue anyway), so any assistance would be appreciated.

Steps to reproduce

Try to install the mastodon_ynh 4.1.0 version, e.g. from the auto-update tree or from my fork at panomaki/mastodon_ynh.

Expected behavior

Succesful install ;-).

Logs

https://paste.yunohost.org/raw/yudihurihi

panomaki commented 1 year ago

Further to this issue, I have the following information to add:

Patching the Gemfile/Gemfile.lock results in an error:

WARNING - You are trying to install in deployment mode after changing
WARNING - your Gemfile. Run `bundle install` elsewhere and add the
WARNING - updated Gemfile.lock to version control.

This can also be witnessed which the CI-tests on yunohost runner (https://ci-apps-dev.yunohost.org/ci/job/5590). I lack the understanding of Ruby to get this solved.

Trying to install v4.1.0 sources without patching recreates the error solved in #361 as it still tries to install 0.1.6.

As a quick and dirty trial I packaged the mastodon sources from v.4.1.0 plus Gargrons update to blurhash 0.1.7 which was just a day too late to get included in the release. Installing that version (via yunohost app install https://github.com/panomaki/mastodon_ynh --debug) works without problems. See (https://paste.yunohost.org/raw/uzizecoxoh) for the install log.

I do not think this is close to a sustainable upgrade path but hope it helps in finding one.

lapineige commented 1 year ago

Aren't those blurhash patches made their way upstream ?

panomaki commented 1 year ago

Aren't those blurhash patches made their way upstream ?

Maybe now? Two weeks ago they hadn't yet.

lapineige commented 1 year ago

Do you know where we can check this ?

panomaki commented 1 year ago

I've opened an issue upstream for this: https://github.com/mastodon/mastodon/issues/24230.

panomaki commented 1 year ago

Solved upstream. See https://github.com/YunoHost-Apps/mastodon_ynh/pull/378.

binarydad commented 1 year ago

For my understanding, are we waiting for a more stable version of mastodon source before allowing the update to happen in YNH? Thanks.

panomaki commented 1 year ago

For my understanding, are we waiting for a more stable version of mastodon source before allowing the update to happen in YNH? Thanks.

No, there is a problem with the automated tests which need to pass before the pull request (#378) is accepted. That problem needs to be solved first.

yalh76 commented 1 year ago

merged in master

lapineige commented 1 year ago

378