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

Move no-signing to RTV exp #30201

Merged
merged 4 commits into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion build-system/global-configs/experiments-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"experimentA": {},
"experimentA": {
"name": "A4A No Signing RTV Experiment",
"environment": "AMP",
"issue": "https://github.com/ampproject/amphtml/issues/27189",
"expiration_date_utc": "2020-12-30",
"define_experiment_constant": "NO_SIGNING_RTV"
},
"experimentB": {},
"experimentC": {}
}
16 changes: 0 additions & 16 deletions build-system/tasks/e2e/amp-driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const AmpdocEnvironment = {

// AMPHTML ads environments
A4A_FIE: 'a4a-fie',
A4A_FIE_NO_SIGNING: 'a4a-fie-no-signing',
A4A_INABOX: 'a4a-inabox',
A4A_INABOX_FRIENDLY: 'a4a-inabox-friendly',
A4A_INABOX_SAFEFRAME: 'a4a-inabox-safeframe',
Expand Down Expand Up @@ -99,21 +98,6 @@ const EnvironmentBehaviorMap = {
},
},

[AmpdocEnvironment.A4A_FIE_NO_SIGNING]: {
async ready(controller) {
return controller
.findElement('amp-ad > iframe')
.then((frame) => controller.switchToFrame(frame));
},

url(url) {
const a4aUrl = url.replace(HOST, HOST + '/a4a');
// Exp value is from extensions/amp-a4a/0.1/amp-a4a.js
// NO_SIGNING_EXP.experiment
return `${a4aUrl}?eid=a4a-no-signing:21066325`;
},
},

[AmpdocEnvironment.A4A_INABOX]: {
async ready(controller) {
return controller
Expand Down
5 changes: 0 additions & 5 deletions build-system/tasks/e2e/describes-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ const EnvironmentVariantMap = {
name: 'AMPHTML ads FIE environment',
value: {environment: 'a4a-fie'},
},
[AmpdocEnvironment.A4A_FIE_NO_SIGNING]: {
name: 'AMPHTML ads FIE environment with no-signing exp enabled',
value: {environment: 'a4a-fie-no-signing'},
},
[AmpdocEnvironment.A4A_INABOX]: {
name: 'AMPHTML ads inabox environment',
value: {environment: 'a4a-inabox'},
Expand All @@ -280,7 +276,6 @@ const envPresets = {
],
'amp4ads-preset': [
AmpdocEnvironment.A4A_FIE,
AmpdocEnvironment.A4A_FIE_NO_SIGNING,
AmpdocEnvironment.A4A_INABOX,
AmpdocEnvironment.A4A_INABOX_FRIENDLY,
AmpdocEnvironment.A4A_INABOX_SAFEFRAME,
Expand Down
16 changes: 2 additions & 14 deletions extensions/amp-a4a/0.1/amp-a4a.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import {
getConsentPolicyState,
} from '../../../src/consent';
import {getContextMetadata} from '../../../src/iframe-attributes';
import {getExperimentBranch} from '../../../src/experiments';
import {getMode} from '../../../src/mode';
import {insertAnalyticsElement} from '../../../src/extension-analytics';
import {
Expand Down Expand Up @@ -179,15 +178,6 @@ const LIFECYCLE_STAGE_TO_ANALYTICS_TRIGGER = {
'crossDomainIframeLoaded': AnalyticsTrigger.AD_IFRAME_LOADED,
};

/**
* @const @enum {string}
*/
export const NO_SIGNING_EXP = {
id: 'a4a-no-signing',
control: '21066324',
Copy link
Contributor

Choose a reason for hiding this comment

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

If we remove this, where do we track the exp id?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is an RTV experiment so we just compare version numbers.

experiment: '21066325',
};

/** @const @enum {string} */
export const MODULE_NOMODULE_PARAMS_EXP = {
ID: 'module-nomodule',
Expand Down Expand Up @@ -870,10 +860,8 @@ export class AmpA4A extends AMP.BaseElement {
* @return {boolean}
*/
isInNoSigningExp() {
return (
getExperimentBranch(this.win, NO_SIGNING_EXP.id) ===
NO_SIGNING_EXP.experiment
);
// eslint-disable-next-line no-undef
return !!NO_SIGNING_RTV;
}

/**
Expand Down