Closed Bug 987147 Opened 6 years ago Closed 6 years ago

Bug 985212 broken capability of TPS to run via sync authentication

Categories

(Firefox :: Sync, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox29 --- fixed
firefox30 --- fixed
firefox31 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Keywords: regression)

Attachments

(1 file)

With the landing of bug 985212, TPS will not be able to correctly run tests via the old sync authentication. The reason is because the fxaccounds.enabled preference is no longer available.

We might have to do something like:

-        # If sync accounts have been chosen, disable Firefox Accounts
-        if self.config.get('auth_type', 'fx_account') != 'fx_account':
-            self.preferences.update({'services.sync.fxaccounts.enabled' : False})
+        # Set a dummy username so the correct auth type is selected by the runtime
+        if self.config.get('auth_type', 'fx_account') == 'fx_account':
+            self.preferences.update({'services.sync.username' : 'dummy@somewhere'})
+        else:
+            self.preferences.update({'services.sync.username' : 'dummy'})

The old sync auth doesn't support usernames with an '@'.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #8396756 - Flags: review?(jgriffin)
Comment on attachment 8396756 [details] [diff] [review]
Re-add old sync support v1

Review of attachment 8396756 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not sure how setting a dummy username re-enables old sync support, but I'll take your word for it!
Attachment #8396756 - Flags: review?(jgriffin) → review+
(In reply to Jonathan Griffin (:jgriffin) from comment #2)
> I'm not sure how setting a dummy username re-enables old sync support, but
> I'll take your word for it!

Long and painful story, but yes, it does.
Jonathan, you might want to have a look at bug 985212. The patch over there changed the behavior how Firefox determines which type of authentication to use. There is no 'services.sync.fxaccounts.enabled' preference anymore, but it will be determined right after start-up by checking the username if exists. If none has been set, fxaccounts is getting enabled by default, and you will have to do larger code quirk to switch to sync authentication. As long as we do not have to hot-flip between both modes (I hope it will not come) the above method should suite us very well.

https://hg.mozilla.org/integration/mozilla-inbound/rev/75f76e0ca48a

We will have to get this patch backported down to beta alongside with the patch on bug 985212.
https://hg.mozilla.org/mozilla-central/rev/75f76e0ca48a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Whiteboard: [needs patch on bug 985212 landed first on each branch]
Comment on attachment 8396756 [details] [diff] [review]
Re-add old sync support v1

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 985212
User impact if declined: TPS test for the old sync authentication will not work anymore
Testing completed (on m-c, etc.): done for m-c
Risk to taking this patch (and alternatives if risky): no
String or IDL/UUID changes made by this patch: none
Attachment #8396756 - Flags: approval-mozilla-beta?
Attachment #8396756 - Flags: approval-mozilla-aurora?
Attachment #8396756 - Flags: approval-mozilla-beta?
Attachment #8396756 - Flags: approval-mozilla-beta+
Attachment #8396756 - Flags: approval-mozilla-aurora?
Attachment #8396756 - Flags: approval-mozilla-aurora+
Component: Firefox Sync: UI → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.