-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
[bugfix/chore] oauth entropy fix + media cleanup tasks rewrite #1853
[bugfix/chore] oauth entropy fix + media cleanup tasks rewrite #1853
Conversation
This is the code I was discussing in matrix @tsmethurst, both the general little entropy fix and at least a solution for the missing profile images bug, even if not necessarily addressing the root cause. If the root cause was the old media cleanup code then it might actually be fixed, if not then the code here will at least be a mitigation for it. |
d83f8b6
to
a3eab8a
Compare
daa97f5
to
3c83670
Compare
this is ready now @tsmethurst the other remaining changes that i crossed out above (though not exactly) i'll make into a second PR |
@@ -214,7 +211,7 @@ func (m *Manager) ProcessMedia(ctx context.Context, data DataFunc, accountID str | |||
func (m *Manager) PreProcessEmoji(ctx context.Context, data DataFunc, shortcode string, emojiID string, uri string, ai *AdditionalEmojiInfo, refresh bool) (*ProcessingEmoji, error) { | |||
instanceAccount, err := m.state.DB.GetInstanceAccount(ctx, "") | |||
if err != nil { | |||
return nil, fmt.Errorf("preProcessEmoji: error fetching this instance account from the db: %s", err) | |||
return nil, gtserror.Newf("error fetching this instance account from the db: %s", err) |
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.
Best to use %w
for these errors so we can unwrap them later if need be, right? Or was this purposeful?
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.
these changes i just made by doing a find and replace on existing error statements, otherwise i would have updated them to use %w
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.
Excellent changes!!
938b9b2
to
82f6a28
Compare
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
…investigate) Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
…rd??) Signed-off-by: kim <grufwub@gmail.com>
0a464c8
to
0a395bd
Compare
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Description
cleaner
package for filesystem / database cleaning / fixing taskscleaner
package, mostly rewritten in the processStill needed
- finish tests fixing move media cleaning tests (combine local + remote prunes)- figure out the testsuite emoji files having a fixed instance ID unrelated to test suite generated one- test function for the new media FixCacheStates() cleaner function- migration script to regenerate "router session" entropy- enable passing in activitypub raw object to enrichAccount again (? this may be source of the missing profile image bug)- figure out actual cause of the missing profile pictures bug (maybe old media cleanup related)- move the emoji refetch code over to thecleaner
package also- cleanup the db.Media{} GetAttachments___() code, the changes here haven't be fully code commented yet and there's probably some overlapping / now unused functions that can be removedChecklist
go fmt ./...
andgolangci-lint run
.