Skip to content

Commit 491fbda

Browse files
benmiroglioakkomar
authored andcommitted
Remove test-pilot filtering
1 parent e7ce3f0 commit 491fbda

1 file changed

Lines changed: 1 addition & 29 deletions

File tree

mozetl/addon_aggregates/addon_aggregates.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from pyspark.sql import SparkSession
44
import pyspark.sql.functions as fun
5-
import json
6-
from six.moves import urllib
75
import click
86

97
MS_FIELDS = [
@@ -24,25 +22,6 @@
2422
]
2523

2624

27-
def get_test_pilot_addons():
28-
"""
29-
Fetches all the live test pilot experiments listed in
30-
the experiments.json file.
31-
:return a list of addon_ids
32-
"""
33-
try:
34-
url = "https://testpilot.firefox.com/api/experiments.json"
35-
response = urllib.request.urlopen(url)
36-
data = json.loads(response.read().decode("utf-8"))
37-
all_tp_addons = ["@testpilot-addon"] + [
38-
i.get("addon_id") for i in data["results"] if i.get("addon_id")
39-
]
40-
except: # noqa
41-
print("Couldn't fetch experiments.json from testpilot")
42-
all_tp_addons = []
43-
return all_tp_addons
44-
45-
4625
def get_dest(output_bucket, output_prefix, output_version, date=None, sample_id=None):
4726
"""
4827
Stitches together an s3 destination.
@@ -124,8 +103,7 @@ def add_addon_columns(df):
124103
& (~df.foreign_install)
125104
& (~df.addon_id.like("%mozilla%"))
126105
& (~df.addon_id.like("%cliqz%"))
127-
& (~df.addon_id.like("%@unified-urlbar%"))
128-
& (~df.addon_id.isin(*NON_MOZ_TEST_PILOT_ADDONS)),
106+
& (~df.addon_id.like("%@unified-urlbar%")),
129107
1,
130108
).otherwise(0),
131109
)
@@ -186,12 +164,6 @@ def aggregate_addons(df):
186164
return addon_aggregates
187165

188166

189-
NON_MOZ_TEST_PILOT_ADDONS = set(
190-
[i for i in get_test_pilot_addons() if "mozilla" not in i]
191-
)
192-
DEFAULT_THEME_ID = "{972ce4c6-7e08-4474-a285-3208198ce6fd}"
193-
194-
195167
@click.command()
196168
@click.option("--date", required=True)
197169
@click.option("--input-bucket", default="telemetry-parquet")

0 commit comments

Comments
 (0)