Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Bug 1442042 - gradual roll-out of TLS 1.3 to release channel #96

Merged
merged 7 commits into from
Mar 20, 2018

Conversation

rhelmer
Copy link
Contributor

@rhelmer rhelmer commented Mar 1, 2018

No description provided.

}
}

async function getRandomnessSeed() {
Copy link

Choose a reason for hiding this comment

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

nit: this doesn't need to be async (in fact some would say you could ditch the function altogether)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, yeah I think the only benefit to having the function vs. calling ClientID.getClientID() directly is to make it clear this is the seed... I don't think it's a big deal though, I will just remove the function.

return ClientID.getClientID();
}

async function generateVariate(seed, label) {
Copy link

Choose a reason for hiding this comment

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

this doesn't appear to do anything async

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does const hash = await hasher.digest(...) below

// initially roll out to 10%, we want to control this on the client rather than
// depending on server-side throttling, as throttling cannot account for any
// other concurrent gradual roll-outs.
const ENABLE_PROB = 0.9;
Copy link

Choose a reason for hiding this comment

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

talked on IRC but either this should be 0.1 or it should be DISABLE_PROB and the logic below should change


let {classes: Cc, interfaces: Ci, utils: Cu} = Components;

Cu.import("resource://gre/modules/Preferences.jsm");
Copy link

Choose a reason for hiding this comment

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

probably easier to just use Services.prefs instead


debug("Installing");

let variate = await generateVariate(await getRandomnessSeed(), data.id);
Copy link

Choose a reason for hiding this comment

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

Is there any point passing in data.id here? why not just hash the client id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @ekr did you have a reason for this ^?

Copy link
Contributor

Choose a reason for hiding this comment

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

This way if you run multiple experiments based on this template they independently select their cohorts rather than having the same people get every experiment

@rhelmer rhelmer force-pushed the bug1442042-tls-1.3-gradual-rollout branch 2 times, most recently from 8d9a43c to d5feba2 Compare March 2, 2018 18:25
@rhelmer rhelmer force-pushed the bug1442042-tls-1.3-gradual-rollout branch from d5feba2 to a2cca68 Compare March 2, 2018 18:26
@rhelmer rhelmer self-assigned this Mar 3, 2018
@rhelmer rhelmer requested a review from Standard8 March 3, 2018 19:55
@rhelmer
Copy link
Contributor Author

rhelmer commented Mar 3, 2018

@Standard8 could you please squash+merge this if it lgty? Thanks!

@rhelmer
Copy link
Contributor Author

rhelmer commented Mar 6, 2018

@aswan, pauljt in https://bugzilla.mozilla.org/show_bug.cgi?id=1442042 points out that we really don't need to do anything on each startup... since the seed is always the same (clientID + addonID), I wouldn't expect the decision to change unless one of these did, which would require an upgrade or install of the add-on.

So, I think we should be able to just move all the work to the install() function. Anything I am missing?

@rhelmer rhelmer force-pushed the bug1442042-tls-1.3-gradual-rollout branch from 24acad1 to c790500 Compare March 6, 2018 06:53
@rhelmer
Copy link
Contributor Author

rhelmer commented Mar 6, 2018

@aswan ugh, scratch that - @ekr just reminded me that we're using the default branch here so that the pref will revert if the add-on doesn't start / is removed for any reason.

I've reverted this branch to be the same as the XPI in https://bugzilla.mozilla.org/show_bug.cgi?id=1442042, so I think we're good to go here.

@Standard8 Standard8 merged commit 444297f into mozilla:master Mar 20, 2018
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.

4 participants