Restoring settings from backup breaks further server-side updates #405
Labels
No labels
a11y
Bug
Bug fix
cannot reproduce
CSS
Documentation
enhancement
Feature
Feature request
Held for next release cycle
Minor change
performance
priority: critical
priority: high
priority: low
priority: medium
priority: patch welcome
regression
Translation/Locale
WIP
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma-fe#405
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version
8765491What’s wrong?
Steps to reproduce:
(alternatively the same may happen when migrating instances/accounts)
The backup contains a
"profileVersion"property recording the version number at time of backup. When restoring the backup, this property gets added into the "settings" object.akkoma-fe will show the value of the outer
"version"property in the profile overview, but the value of the"profileVersion"property inside"settings"when showing what’s currently used.The server only parses the outer
"version"property and expects it to increase by exactly one each update. However, akkoma-fe will use the value from"profileVersion"when sending PUT update requests to the server, leading to the request being rejected. Thus no new changes get stored on the server.What should happen instead?
akkoma-fe should either fully restore the old
profileVersionvalue, or disregard it entirely. I believe each can be achieved like follows:Restore old version value:
DELETEthe current profileprofileVersionfrom the backup and recreate the profile with this version and do not include"profileVersion"within settingsDisregard old version value:
profileVersionfrom the backup before restoreAdditionally, given some already restored backups, the current logic for determining the version to use should also be adjusted to disregard the
profileVersionfield within settings.On a side note: i noticed restoring from backup can take quite a while; my tab was frozen for several seconds. I don't know what akkoma-fe is doing here. Switching profiles or logging in (initially loading the profile) doesn't come with such a large perf overhead.
Going with the DELETE + restore with old version, then refresh. approach might speed things up.
Workaround
If you’re affected by this and read this before it is fixed; here’s a manual workaround. This assumes your profile is called
defaultand your instance isotp.akkoma.dev, replace as necessary./api/v1/timelines, click on it and copy the value of theAuthorizationrequest headerprofileVersionproperty inside thesettingsobjectSeverity
I can manage
Have you searched for this issue?