Closed Bug 1349576 Opened 7 years ago Closed 7 years ago

Filter for total synced devices does not match the number of devices

Categories

(Shield :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
Tracking Status
firefox53 --- fixed

People

(Reporter: aflorinescu, Unassigned)

References

(Blocks 1 open bug)

Details

[Preconditions:]

1. Obtain a copy of Firefox with the SHIELD recipe client system add-on installed. You can check about:support to ensure that you have it.
2. Set the extensions.shield-recipe-client.dev_mode preference to true to run recipes immediately on startup.
3. Set the extensions.shield-recipe-client.logging.level preference to 0 to enable more logging.
4. Set the security.content.signature.root_hash preference to DB:74:CE:58:E4:F9:D0:9E:E0:42:36:BE:6C:C5:C4:F6:6A:E7:74:7D:C0:21:42:7A:03:BC:2F:57:0C:8B:9B:90.
5. Set the preference value for extensions.shield-recipe-client.api_url set to https://normandy.stage.mozaws.net/api/v1

[Steps:]
1. Open Admin Interface. 
2. Create a default heartbeat type recipe.
3. Set a filter with normandy.syncTotalDevices == 2.
4. Open a FF with a profile containing the preconditions.
5. Create a sync account.
6. Have synced 1 mobile device and 1 Desktop device.
7. Restart FF browser

[Actual Result:}
The recipe is fetched, but not executed.

[Expected Result:]
The heartbeat is executed, as the condition should return true.

[Note1:]
As far as I know there is a logic related to sync devices that makes them inactive if the devices haven't synced from more than 30days?! We should know if all devices are counted (inactive + active) or just the active ones.

[Note2:]
Using normandy.syncSetup or normandy.syncMobileDevices filters will validate the filters and the recipe will run successfully.
Taking in consideration https://bugzilla.mozilla.org/show_bug.cgi?id=1349574#c3, I still don't see recipe execution for this filter: normandy.syncTotalDevices. --> I'm assuming that the total number of devices would be the sum of mobile(services.sync.clients.devices.mobile) and desktop(services.sync.clients.devices.desktop).
Flags: needinfo?(mkelly)
(In reply to Adrian Florinescu [:AdrianSV] from comment #1)
> Taking in consideration
> https://bugzilla.mozilla.org/show_bug.cgi?id=1349574#c3, I still don't see
> recipe execution for this filter: normandy.syncTotalDevices. --> I'm
> assuming that the total number of devices would be the sum of
> mobile(services.sync.clients.devices.mobile) and
> desktop(services.sync.clients.devices.desktop).

We're actually using a pref named services.sync.numClients, but I think at some point since we started using it sync stopped updating it. We should just use the sum of those other two values, as you suggested.

PR is up: https://github.com/mozilla/normandy/pull/634
Flags: needinfo?(mkelly)
Commits pushed to master at https://github.com/mozilla/normandy

https://github.com/mozilla/normandy/commit/6eb60870bbd9d0332f08b90ecb3a17120019d7ec
Fix bug 1349576: Remove use of services.sync.numClients preference.

It seems that sync is no longer maintaining this preference, so instead we
simply add the mobile and desktop client counts to get the same value.

https://github.com/mozilla/normandy/commit/6e96cacba67546909c37c7e574c694042b0267d0
Merge pull request #634 from Osmose/sync-total-count

Bug 1349576: Remove use of services.sync.numClients preference.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.