Skip to content
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

GH-2159: Update frequency reduction, AB test opt-out, remove Cliqz AB test #608

Merged
merged 24 commits into from Sep 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d5ea47a
Reduce scheduledTasks and autoUpdatedBugDb frequencies from once an h…
wlycdgr Sep 21, 2020
544043c
Refactor autoUpdateBugDb so it always does the same thing when called…
wlycdgr Sep 21, 2020
9f2cf6c
Update autoUpdateBugDB documentation and refactor a little more to ma…
wlycdgr Sep 21, 2020
568acea
Clean up autoUpdateBugDB a bit more: Clarify docs, flatten, and move …
wlycdgr Sep 21, 2020
5c624b3
Minor comment in autoUpdateBugDb
wlycdgr Sep 21, 2020
ef45c82
Renamed autoUpdateBugDb to clarify connection to checkLibraryVersion.…
wlycdgr Sep 21, 2020
ad20931
Edit db update function names and docs to improve clarity
wlycdgr Sep 21, 2020
c761b7c
Remove Cliqz anti-tracking A/B test config code from background. Tidy…
wlycdgr Sep 21, 2020
b0a54c5
Split up and reorganize setupABTest so outside code can only call tho…
wlycdgr Sep 21, 2020
94cfe13
Merge in develop
wlycdgr Sep 22, 2020
c563a1d
Clean up OptIn a bit in preparation for adding A/B test checkbox
wlycdgr Sep 22, 2020
89d6e0f
Finish OptIn tidy-up
wlycdgr Sep 22, 2020
2572a2d
Stub out new A/B test opt-in setting. Add draft strings for it.
wlycdgr Sep 22, 2020
2d42906
Implement the enable_abtests conf setting and plug it into the checkb…
wlycdgr Sep 23, 2020
1f3a03f
Do not call setupABTests if enable_abtests is false
wlycdgr Sep 23, 2020
cba107f
Skip the call to the AB server altogether if ab tests are disabled
wlycdgr Sep 23, 2020
f369ad2
Update AB test setting tooltip copy. remove enable_abtests from unins…
wlycdgr Sep 23, 2020
a0f0f0c
Remove unused import from Metrics
wlycdgr Sep 23, 2020
fa54859
Update test snapshot
wlycdgr Sep 23, 2020
004506b
Fix typo
wlycdgr Sep 23, 2020
98644ff
Fix comment errors
wlycdgr Sep 23, 2020
9f6b99d
Remove bloom filter Cliqz test
wlycdgr Sep 24, 2020
f1b4835
remove comment
christophertino Sep 24, 2020
6d8d250
Merge branch 'develop' into GH-2159
christophertino Sep 24, 2020
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Split up and reorganize setupABTest so outside code can only call tho…

…se parts of the original it actually needs.
  • Loading branch information
wlycdgr committed Sep 21, 2020
commit b0a54c5e813b26d8276e53e02a206619e8fa69b8
@@ -1113,28 +1113,48 @@ function setupHubPromoABTest() {
}

/**
* Adjust antitracking parameters based on the current state
* of ABTest and availability of Human Web.
* @since 8.5.3
*
* Setup the Bloom Filter `antitracking_whitelist2` test.
* @memberOf Background
*/
function setupABTest() {
if (conf.enable_anti_tracking) {
const antitrackingConfig = {
qsEnabled: true,
telemetryMode: conf.enable_human_web ? 1 : 0,
};
Object.entries(antitrackingConfig).forEach(([opt, val]) => {
log('antitracking', 'set config option', opt, val);
antitracking.action('setConfigOption', opt, val);
});
}

function setupBloomFilterABTest() {
if (abtest.hasTest('antitracking_whitelist2')) {
cliqz.prefs.set('attrackBloomFilter', false);
This conversation was marked as resolved by christophertino

This comment has been minimized.

@sammacbeth

sammacbeth Sep 24, 2020
Contributor

We don't use this setting anymore. This test can be removed.

This comment has been minimized.

@wlycdgr

wlycdgr Sep 24, 2020
Author Member

Done

}
}

/**
* Configure A/B tests based on data fetched from the A/B servecr
* @memberOf Background
*/
function setupABTests() {
setupBloomFilterABTest();
setupHubPromoABTest();
}

/**
* @since 8.5.3
*
* Update config options for the Cliqz antitracking module to match the current human web setting.
* Log out the updates. Returns without doing anything if antitracking is disabled.
*
* @param {Boolean} isAntitrackingEnabled Whether antitracking is currently enabled.
*/
function setCliqzAntitrackingConfig(isAntitrackingEnabled) {
if (!isAntitrackingEnabled) return;

const antitrackingConfig = {
qsEnabled: true,
telemetryMode: conf.enable_human_web ? 1 : 0,
};

Object.entries(antitrackingConfig).forEach(([opt, val]) => {
log('antitracking', 'set config option', opt, val);
antitracking.action('setConfigOption', opt, val);
});
}

/**
* Initialize Dispatcher Events.
* All Conf properties trigger a dispatcher pub event
@@ -1161,7 +1181,7 @@ function initializeDispatcher() {
dispatcher.on('conf.save.enable_human_web', (enableHumanWeb) => {
if (!IS_CLIQZ) {
setCliqzModuleEnabled(humanweb, enableHumanWeb).then(() => {
setupABTest();
setCliqzAntitrackingConfig(conf.enable_anti_tracking);
});
} else {
setCliqzModuleEnabled(humanweb, false);
@@ -1187,7 +1207,11 @@ function initializeDispatcher() {
});
dispatcher.on('conf.save.enable_anti_tracking', (enableAntitracking) => {
if (!IS_CLIQZ) {
setCliqzModuleEnabled(antitracking, enableAntitracking);
setCliqzModuleEnabled(antitracking, enableAntitracking).then(() => {
// enable_human_web could have been toggled while antitracking was off,
// so we want to make sure to update the antitracking telemetry option
setCliqzAntitrackingConfig(conf.enable_anti_tracking);
});
} else {
setCliqzModuleEnabled(antitracking, false);
}
@@ -1693,7 +1717,7 @@ function initializeGhosteryModules() {
// auto-fetch human web offer
This conversation was marked as resolved by christophertino

This comment has been minimized.

@christophertino

christophertino Sep 24, 2020
Member

i don't think this comment applies anymore

abtest.fetch()
.then(() => {
setupABTest();
setupABTests();
})
.catch(() => {
log('Unable to reach abtest server');
ProTip! Use n and p to navigate between commits in a pull request.