-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Fix tootctl upgrade storage-schema
misbehaving
#13761
Conversation
lib/mastodon/upgrade_cli.rb
Outdated
# Hopefully if this does happen, it happens for all styles, but if | ||
# transfer of one or more of the styles fails, we should not mark | ||
# the record as upgraded | ||
attachment.instance_write(:storage_schema_version, CURRENT_STORAGE_SCHEMA_VERSION) if success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an error occurs for one style and not the others, we'll have some files already moved, and re-running the task will always fail, right? Is there something sensible we can do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, what if only :original
will determine whether upgrade failed or not, and the other styles will be ignored? Because you could re-generate other styles from :original
as long as you had it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, ok, but we don't have anything to actually re-generate other styles, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what paperclip's reprocess!
does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but there's nothing for an admin to run it, and it wouldn't get triggered automatically either, would it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but I still consider it fixable, e.g. you'd give the admin code to run in console.
8175933
to
725433f
Compare
- Fix not moving original files of custom emojis - Fix command failing to move any files with S3 storage - Fix command marking records as upgraded when move failed Fix #13594
725433f
to
fb6f7a5
Compare
- Fix not moving original files of custom emojis - Fix command failing to move any files with S3 storage - Fix command marking records as upgraded when move failed Fix mastodon#13594
- Fix not moving original files of custom emojis - Fix command failing to move any files with S3 storage - Fix command marking records as upgraded when move failed Fix mastodon#13594
Fix #13594