-
Notifications
You must be signed in to change notification settings - Fork 166
Refactoring more methods into PackageStorage. #8194
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
Conversation
app/lib/package/package_storage.dart
Outdated
| if (info == null) { | ||
| return ContentMatchStatus.missing; | ||
| } | ||
| // TODO: implement quick md5 match that doesn't require to download full content |
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.
This sounds important. Perhaps open an issue and attach the issue number here.
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.
I think this is more of a shortcut on repeated upload checks than a critical part, because it would only help the rejection path, which may be rare. Instead, I think we should move all of these checks into a separate isolate and not do it in the frontend-serving one as part of the direct request path. I'll file an issue for that and add this to 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.
I've updated the code to do the md5 hash check already with this refactor. PTAL.
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.
LGTM.
sigurdm
left a comment
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.
I think the title of the PR is wrong - there seems to be going more on than just moving code...
The logic of the method did not change, only a return value was introduced, because it has three result states, which was handled inlined previously. I can separate it out in a new PR if you prefer that. |
|
You can also just update the title - "moving" code to me means you can more or less find each deleted line added somewhere else. |
Continuing #8183.