Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Closes #2727: Rust SyncManager integration #4480

Merged
merged 6 commits into from
Sep 27, 2019

Conversation

grigoryk
Copy link
Contributor

@grigoryk grigoryk commented Sep 20, 2019

Fixes #2727.
This has most of the pieces in the right places.
I think all of the necessary public API changes are done.

It mostly works, except that I've hit some bugs in the rust library:

Fenix PR that enables "choose what to sync" on top of this: mozilla-mobile/fenix#5450


Pull Request checklist

  • Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry or does not need one
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues closed by this pull request are added to the milestone of the version currently in development.
  • Breaking Changes: If this is a breaking change, please push a draft PR on Reference Browser to address the breaking issues.

@grigoryk grigoryk changed the title WIP Rust SyncManager integration first pass WIP Rust SyncManager integration Sep 20, 2019
@grigoryk grigoryk mentioned this pull request Sep 20, 2019
6 tasks
@grigoryk grigoryk changed the title WIP Rust SyncManager integration Rust SyncManager integration Sep 20, 2019
@grigoryk grigoryk added the work in progress Not ready to land yet. Work in progress (WIP). label Sep 20, 2019
@grigoryk grigoryk changed the title Rust SyncManager integration Closes #2727: Rust SyncManager integration Sep 20, 2019
@codecov
Copy link

codecov bot commented Sep 23, 2019

Codecov Report

Merging #4480 into master will decrease coverage by 2.59%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #4480     +/-   ##
===========================================
- Coverage     86.64%   84.05%   -2.6%     
+ Complexity      911      171    -740     
===========================================
  Files           102       16     -86     
  Lines          3527      928   -2599     
  Branches        499      159    -340     
===========================================
- Hits           3056      780   -2276     
+ Misses          232      100    -132     
+ Partials        239       48    -191
Impacted Files Coverage Δ Complexity Δ
...nents/feature/prompts/widget/MonthAndYearPicker.kt
...illa/components/service/experiments/Experiments.kt
...oard/storage/flatfile/FlatFileExperimentStorage.kt
.../components/feature/prompts/AlertDialogFragment.kt
...lla/components/feature/toolbar/ToolbarPresenter.kt
...ozilla/components/feature/prompts/ChoiceAdapter.kt
...la/components/feature/toolbar/ToolbarInteractor.kt
...la/components/browser/search/suggestions/Parser.kt
...ents/feature/toolbar/ToolbarAutocompleteFeature.kt
.../mozilla/components/service/fretboard/Fretboard.kt
... and 108 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bd8ede...d9abf6e. Read the comment docs.

@grigoryk grigoryk force-pushed the syncManager branch 8 times, most recently from bc06b00 to 67f7389 Compare September 25, 2019 07:54
@grigoryk
Copy link
Contributor Author

Reminder to self: flag @Dexterp37 and @linacambridge to review Glean changes.

@grigoryk grigoryk force-pushed the syncManager branch 3 times, most recently from fa0344c to 4ac03ab Compare September 26, 2019 03:01
@grigoryk grigoryk marked this pull request as ready for review September 26, 2019 03:01
@grigoryk grigoryk requested a review from a team as a code owner September 26, 2019 03:01
@grigoryk grigoryk removed the work in progress Not ready to land yet. Work in progress (WIP). label Sep 26, 2019
@grigoryk
Copy link
Contributor Author

Today's version of a-s - 0.39.4 - appears to work correctly, so we can start landing this now.

Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me from a Glean point of view. Please note that the following things are required before merging this:

  • test that sync data is still collected properly after your change. You can do so by using the Glean ping debug view either in a sample app or in any product using these components (Fenix?)
  • add support-sync-telemetry to the list of probe-scraper dependencies and update the entries for the components depending on it; you can coordinate with @fbertsch and @mdboom about this.

@Amejia481
Copy link
Contributor

We have a failing task on tc support-sync-telemetry assembleAndTestAndLintReleaseAll

@grigoryk
Copy link
Contributor Author

Yeah, it passes locally though :(

@grigoryk
Copy link
Contributor Author

grigoryk commented Sep 27, 2019

TODO before landing:

  • file remaining follow-up issues
  • changelog
  • documentation
  • test that sync data is still collected properly after your change. You can do so by using the Glean ping debug view either in a sample app or in any product using these components (Fenix?)

Copy link
Contributor

@csadilek csadilek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@grigoryk grigoryk force-pushed the syncManager branch 2 times, most recently from 7fc14d2 to 4034a61 Compare September 27, 2019 19:25
Grisha Kruglov and others added 6 commits September 27, 2019 12:39
We will need to record sync telemetry from the sync manager. We already
have telemetry related code, but at the DB Connection level.

This patch refactors this code into a singleton object that may be
used from within any context in which there's a ping object available that
needs to be processed.
This allows us to use the same Glean definitions and processing logic
from multiple components. In our case, it'll be browser-storage-sync
(for non-AccountManager syncing) and services-firefox-accounts (SyncManager integration)
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
@grigoryk
Copy link
Contributor Author

bors r=csadilek

bors bot pushed a commit that referenced this pull request Sep 27, 2019
4480: Closes #2727: Rust SyncManager integration r=csadilek a=grigoryk

Fixes #2727.
This has most of the pieces in the right places.
I think all of the necessary public API changes are done.

It mostly works, except that I've hit some bugs in the rust library:
- mozilla/application-services#1831 (blocker)
- mozilla/application-services#1829 (minor)

Fenix PR that enables "choose what to sync" on top of this: mozilla-mobile/fenix#5450



Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
@bors
Copy link

bors bot commented Sep 27, 2019

Build succeeded

@bors bors bot merged commit d9abf6e into mozilla-mobile:master Sep 27, 2019
@grigoryk grigoryk deleted the syncManager branch September 28, 2019 02:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate appservices SyncManager
5 participants