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

🚮 Sweep experiments older than 2020-01-01 #2

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions build-system/global-configs/canary-config.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
{
"allow-doc-opt-in": ["amp-next-page", "analytics-chunks-inabox"],
"allow-url-opt-in": ["pump-early-frame"],
"allow-url-opt-in": [],
"amp-accordion-display-locking": 1,
"canary": 1,
"a4aProfilingRate": 0.01,
"adsense-ad-size-optimization": 0.1,
"amp-action-macro": 1,
"amp-ad-ff-adx-ady": 0.01,
"amp-auto-ads-adsense-holdout": 0.1,
"ampdoc-fie": 1,
"amp-story-responsive-units": 1,
"amp-story-v1": 1,
"chunked-amp": 1,
"doubleclickSraExp": 0.01,
"doubleclickSraReportExcludedBlock": 0.1,
"dfp-render-on-idle-cwv-exp": 1,
"expand-json-targeting": 1,
"fix-inconsistent-responsive-height-selection": 0,
"flexAdSlots": 0.05,
"intersect-resources": 0,
"ios-fixed-no-transfer": 1,
"pump-early-frame": 1,
"remove-task-timeout": 0,
"amp-ad-no-center-css": 0,
"render-on-idle-fix": 1,
Expand Down
8 changes: 1 addition & 7 deletions build-system/global-configs/prod-config.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
{
"allow-doc-opt-in": ["amp-next-page", "analytics-chunks-inabox"],
"allow-url-opt-in": ["pump-early-frame"],
"allow-url-opt-in": [],
"canary": 0,
"a4aProfilingRate": 0.01,
"adsense-ad-size-optimization": 0.1,
"amp-accordion-display-locking": 1,
"amp-action-macro": 1,
"amp-ad-ff-adx-ady": 0.01,
"amp-auto-ads-adsense-holdout": 0.1,
"ampdoc-fie": 1,
"amp-story-responsive-units": 1,
"amp-story-v1": 1,
"chunked-amp": 1,
"doubleclickSraExp": 0.01,
"doubleclickSraReportExcludedBlock": 0.1,
"expand-json-targeting": 1,
"fix-inconsistent-responsive-height-selection": 0,
"flexAdSlots": 0.05,
"intersect-resources": 0,
"ios-fixed-no-transfer": 0,
"pump-early-frame": 1,
"amp-ad-no-center-css": 0,
"adsense-ptt-exp": 0.1,
"doubleclick-ptt-exp": 0.1,
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-action-macro/0.1/amp-action-macro.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
import {LayoutPriority} from '../../../src/layout';
import {Services} from '../../../src/services';
import {isExperimentOn} from '../../../src/experiments';
import {userAssert} from '../../../src/log';

/** @const {string} */
Expand All @@ -39,7 +38,8 @@ export class AmpActionMacro extends AMP.BaseElement {
/** @override */
buildCallback() {
userAssert(
isExperimentOn(this.win, 'amp-action-macro'),
/* isExperimentOn(this.win, 'amp-action-macro') // launched: true */
true,
'Experiment is off'
);
const {element} = this;
Expand Down
8 changes: 2 additions & 6 deletions extensions/amp-action-macro/0.1/test/test-amp-action-macro.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {ActionInvocation} from '../../../../src/service/action-impl';
import {ActionTrust} from '../../../../src/action-constants';
import {AmpActionMacro} from '../amp-action-macro';
import {Services} from '../../../../src/services';
import {toggleExperiment} from '../../../../src/experiments';

describes.realWin(
'amp-action-macro',
Expand All @@ -35,8 +34,6 @@ describes.realWin(
beforeEach(() => {
win = env.win;
doc = win.document;

toggleExperiment(win, 'amp-action-macro', true);
});

function newActionMacro() {
Expand All @@ -60,7 +57,8 @@ describes.realWin(

it('should not build if experiment is off', () => {
return allowConsoleError(() => {
toggleExperiment(env.win, 'amp-action-macro', false);
/* toggleExperiment(env.win, 'amp-action-macro', false) // launched: true */
false;
return newActionMacro().catch((err) => {
expect(err.message).to.include('Experiment is off');
});
Expand All @@ -75,8 +73,6 @@ describes.realWin(
let unreferrableMacro;
let unreferrableMacroElement;
beforeEach(() => {
toggleExperiment(win, 'amp-action-macro', true);

// This macro is referrable and can be invoked by the macro element(s)
// defined after it.
referrableMacroElement = doc.createElement('amp-action-macro');
Expand Down
7 changes: 3 additions & 4 deletions extensions/amp-story/1.0/test/test-amp-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -1656,12 +1656,11 @@ describes.realWin(
});

describe('amp-story rewriteStyles', () => {
beforeEach(() => {
toggleExperiment(win, 'amp-story-responsive-units', true);
});
beforeEach(() => {});

afterEach(() => {
toggleExperiment(win, 'amp-story-responsive-units', false);
/* toggleExperiment(win, 'amp-story-responsive-units', false) // launched: true */
false;
});

it('should rewrite vw styles', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ function maybeLoadCorrectVersion(win, fnOrStruct) {
* pumped.
*/
function maybePumpEarlyFrame(win, cb) {
if (!isExperimentOn(win, 'pump-early-frame')) {
if (!(/* isExperimentOn(win, 'pump-early-frame') // launched: true */ true)) {
cb();
return;
}
Expand Down
4 changes: 0 additions & 4 deletions test/unit/test-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {installPlatformService} from '../../src/service/platform-impl';
import {installTimerService} from '../../src/service/timer-impl';
import {setShadowDomSupportedVersionForTesting} from '../../src/web-components';
import {toArray} from '../../src/types';
import {toggleExperiment} from '../../src/experiments';
import {vsyncForTesting} from '../../src/service/vsync-impl';

describes.fakeWin(
Expand Down Expand Up @@ -202,7 +201,6 @@ describes.fakeWin(
);

it('should not maybePumpEarlyFrame when body not yet present', () => {
toggleExperiment(win, 'pump-early-frame', true);
// Make document.body be null on first invocation to simulate
// JS executing before the rest of the doc has been parsed.
const {body} = win.document;
Expand All @@ -223,14 +221,12 @@ describes.fakeWin(
'should not maybePumpEarlyFrame ' +
'when a renderDelayingExtension is present',
() => {
toggleExperiment(win, 'pump-early-frame', true);
win.document.body.appendChild(document.createElement('amp-experiment'));
extensionRegistrationTest();
}
);

it('should maybePumpEarlyFrame and delay extension execution', () => {
toggleExperiment(win, 'pump-early-frame', true);
let progress = '';
const queueExtensions = win.AMP;
const highPriority = regularExtension((amp) => {
Expand Down
30 changes: 0 additions & 30 deletions tools/experiments/experiments-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,12 @@ export const EXPERIMENTS = [
name: 'Allows the new lightbox experience to be used in A4A (prototype).',
spec: 'https://github.com/ampproject/amphtml/issues/7743',
},
{
id: 'amp-action-macro',
name: 'AMP extension for defining action macros',
spec: 'https://github.com/ampproject/amphtml/issues/19494',
cleanupIssue: 'https://github.com/ampproject/amphtml/pull/19495',
},
{
id: 'ios-fixed-no-transfer',
name: 'Remove fixed transfer from iOS 12.2 and up',
spec: 'https://github.com/ampproject/amphtml/issues/22220',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/22220',
},
{
id: 'chunked-amp',
name: "Split AMP's loading phase into chunks",
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/5535',
},
{
id: 'pump-early-frame',
name:
'If applicable, let the browser paint the current frame before ' +
'executing the callback.',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/8237',
},
{
id: 'web-worker',
name: 'Web worker for background processing',
Expand Down Expand Up @@ -130,12 +112,6 @@ export const EXPERIMENTS = [
spec: 'https://github.com/ampproject/amphtml/issues/11329',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/14357',
},
{
id: 'amp-story-responsive-units',
name: 'Scale pages in amp-story by rewriting responsive units',
spec: 'https://github.com/ampproject/amphtml/issues/15955',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/15960',
},
{
id: 'amp-next-page',
name: 'Document level next page recommendations and infinite scroll',
Expand Down Expand Up @@ -185,12 +161,6 @@ export const EXPERIMENTS = [
spec: 'https://github.com/ampproject/amphtml/issues/23568',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/24165',
},
{
id: 'fix-inconsistent-responsive-height-selection',
name: 'Fix inconsistent responsive height selection.',
spec: 'https://github.com/ampproject/amphtml/issues/24166',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/24167',
},
{
id: 'intersect-resources',
name: 'Use IntersectionObserver for resource scheduling.',
Expand Down