-
Notifications
You must be signed in to change notification settings - Fork 224
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
Bug 1897264 - interruption support for ingestion (backport #6246) #6256
Conversation
Cherry-pick of 8bd7ba4 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-v127 #6256 +/- ##
=================================================
- Coverage 83.68% 50.85% -32.84%
=================================================
Files 117 112 -5
Lines 15653 11811 -3842
=================================================
- Hits 13099 6006 -7093
- Misses 2554 5805 +3251 ☔ View full report in Codecov by Sentry. |
Made the API more high-level and not just a copy of the remote settings client API. It now inputs a `SuggestRemoteSettingsRecordRequest` which is specific to the kinds of requests we make. It outputs a list of records linked to the attachment data. This way: - It's simpler to mock up in the tests since the mocks can match the actual requests more directly. I'm hoping to use this to simplify the store tests which have gotten really out of hand. - We abstract away some of the remote settings client details, which makes it easer to switch how we make requests in the future. (cherry picked from commit 1df5028)
Added an `interrupt_everything` method that interrupts both the read and write connection. This is intended for iOS to use to interrupt the suggest component during shutdown. See https://bugzilla.mozilla.org/show_bug.cgi?id=1897299 for a discussion on next steps here. Created a new `WriteScope` type that stores an interrupt scope that can be used for multiple `write` calls. This allows the ingestion code to catch all interruptions that happened after the ingestion started. With the old system, if `interrupt_everything` was called in-between ingestion two types then we might miss it. (cherry picked from commit 8bd7ba4)
c97e7ec
to
0a7792f
Compare
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.
Looks great to me, thanks for doing this uplift.
The SwiftLint failures aren't caused by this PR (but, unfortunately, that means it's failing on all our PRs now)—#6254 fixes them for everyone! |
Added an
interrupt_everything
method that interrupts both the read and write connection. This is intended for iOS to use to interrupt the suggest component during shutdown. See https://bugzilla.mozilla.org/show_bug.cgi?id=1897299 for a discussion on next steps here.Created a new
WriteScope
type that stores an interrupt scope that can be used for multiplewrite
calls. This allows the ingestion code to catch all interruptions that happened after the ingestion started. With the old system, ifinterrupt_everything
was called in-between ingestion two types then we might miss it.Pull Request checklist
[ci full]
to the PR title.Branch builds: add
[firefox-android: branch-name]
to the PR title.This is an automatic backport of pull request #6246 done by [Mergify](https://mergify.com).