YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
44 stars 15 forks source link

Upgrade to v0.10.6 #84

Closed ahstro closed 5 years ago

ahstro commented 5 years ago

Problem

Solution

PR Status

Package_check results


Build Status

lapineige commented 5 years ago

Upgrade fails, with an error like that:

Warning: [DEBUG]: DEBUG - DETAIL: Key (uri)=([https://MastodonStatusURL]) is duplicated. (SQL: alter table "statuses" add constraint "statuses_uri_unique" unique ("uri")) Warning: [DEBUG]: DEBUG - Warning: [DEBUG]: DEBUG - at /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 Warning: [DEBUG]: DEBUG - 660| // If an exception occurs when attempting to run a query, we'll format the error Warning: [DEBUG]: DEBUG - 661| // message to include the bindings with SQL, which will make this exception a Warning: [DEBUG]: DEBUG - 662| // lot more helpful to the developer instead of just the database's errors. Warning: [DEBUG]: DEBUG - 663| catch (Exception $e) { Warning: [DEBUG]: DEBUG - > 664| throw new QueryException( Warning: [DEBUG]: DEBUG - 665| $query, $this->prepareBindings($bindings), $e Warning: [DEBUG]: DEBUG - 666| ); Warning: [DEBUG]: DEBUG - 667| } Warning: [DEBUG]: DEBUG - 668| Warning: [DEBUG]: DEBUG

That status doesn't even exist anymore. I had the same issue with a status of mine, I deleted it, it worked. For this one (not from me), which is also a comment, deleting it from Mastodon doesn't solve the issue :(

Note: this comment was an a picture that no longer exist...

This fails when Migrating one table in the database:

Migrating: 2019_08_11_084611_add_unique_to_statuses_table

lapineige commented 5 years ago

This is a known issue: https://github.com/pixelfed/pixelfed/issues/1701

I'd suggest to wait until it's solved before merging.

ahstro commented 5 years ago

Strange, I tried upgrading and it worked. Oh well, guess waiting for that issue to be closed is the smartest move here.

capmisson commented 5 years ago

@ahstro what did you upgraded to make it work?

ahstro commented 5 years ago

@capmisson I installed Pixelfed from the upstream testing branch, then upgraded from my fork

lapineige commented 5 years ago

https://github.com/pixelfed/pixelfed/releases/tag/v0.10.4 is out, let's update this PR ? :)

lapineige commented 5 years ago

https://github.com/pixelfed/pixelfed/releases/tag/v0.10.5, in fact.

And our bug should be fixed: https://github.com/pixelfed/pixelfed/issues/1701#event-2659157729

dansup commented 5 years ago

v0.10.5 is now out, let me know if there is anything I can do to help update this YunoHost app!

ahstro commented 5 years ago

Noticed 0.10.6 is out soon too (y'all are working fast). I'll try to look into updating this PR when I get some time, but if someone else feels like doing one, go ahead 😊

lapineige commented 5 years ago

0.10.6 is out ? It's not listed here: https://github.com/pixelfed/pixelfed/releases/

edit: Oh ok, it's still a PR, not an official stable version https://github.com/pixelfed/pixelfed/pull/1717

StopTrackingUs commented 5 years ago

Tips for fixing the duplication bug from federated status:

  1. Run upgrade in debug
  2. Copy the postgres login line (if you know the login creds you can skip this)
  3. Copy the uri causing the error 4.su root 5.log into postgres
  4. Delete the rows in the table "statuses" that has the uri listed in the error

I had to do this multiple times due to 2 comments on the same status duplicated.

lapineige commented 5 years ago

I can't run the upgrade command, as it's a Yunohost package, I should not upgrade by the normal process. I don't know how to log in postgres, neither how to delete anything from here.

StopTrackingUs commented 5 years ago

@lapineige yunohost has a command line upgrade process. That is what im refering to.

ahstro commented 5 years ago

Updated PR to latest version out now (0.10.6). Sorry about the branch name, but it wasn't editable and I didn't want to close this PR and open a new one on account of the discussion.

ahstro commented 5 years ago

Just saw this toot about php-intl being a dependency, so added it now. Works on my testing instance :)

yalh76 commented 5 years ago

@ahstro Thanks for the help, I was a bit away from coding.

yalh76 commented 5 years ago

v0.10.5 is now out, let me know if there is anything I can do to help update this YunoHost app!

Hi @dansup

Sorry for the time to upgrade Pixelfed. I was a bit discouraged of coding as I was stuck by bugs on other apps.

But no back online ^^

ahstro commented 5 years ago

No worries, @yalh76, we all get down periods sometimes. Hope you take care of yourself :pray: :relaxed:

lapineige commented 5 years ago

Tips for fixing the duplication bug from federated status:

Run upgrade in debug Copy the postgres login line (if you know the login creds you can skip this) Copy the uri causing the error 4.su root 5.log into postgres Delete the rows in the table "statuses" that has the uri listed in the error

I had to do this multiple times due to 2 comments on the same status duplicated.

I had to do it multiple times too, that's why I was searching for a more automated way to remove duplicates. Still the issue seems solved, thanks :)