Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application-services/application-services.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
APPLICATION_SERVICES_BUILD_ID=147.20251125170615
APPLICATION_SERVICES_BUILD_ID=147.20251126050344
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def validate_jexl_expr(expression, application):
android_sdk_version="33",
debug_tag="",
installation_date=None,
home_directory="",
custom_targeting_attributes=None,
)

Expand Down
17 changes: 6 additions & 11 deletions experimenter/tests/integration/nimbus/app_contexts.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"query_result": {
"id": 15734423,
"query_hash": "85e731a13b18b6a67cb24eb9ab953842",
"query": "-- A query to generate Nimbus application contexts in JSON format for the\n-- purpose of testing client targeting.\n--\n-- The existing app contexts used by the Nimbus Rust SDK are shaped like this:\n--\n-- pub struct AppContext {\n-- pub app_name: String,\n-- pub app_id: String,\n-- pub channel: String,\n-- pub app_version: Option<String>,\n-- pub app_build: Option<String>,\n-- pub architecture: Option<String>,\n-- pub device_manufacturer: Option<String>,\n-- pub device_model: Option<String>,\n-- pub locale: Option<String>,\n-- pub os: Option<String>,\n-- pub os_version: Option<String>,\n-- pub android_sdk_version: Option<String>,\n-- pub debug_tag: Option<String>,\n-- pub installation_date: Option<i64>,\n-- pub home_directory: Option<String>,\n-- #[serde(flatten)]\n-- pub custom_targeting_attributes: Option<HashMap<String, String>>,\n-- }\n\nWITH randomish_sample AS\n(\n SELECT \n \"fenix\" AS app_name,\n \"org.mozilla.firefox\" AS app_id,\n client_info.app_channel AS channel,\n client_info.app_display_version AS app_version,\n client_info.app_build AS app_build,\n client_info.architecture AS architecture,\n client_info.device_manufacturer AS device_manufacturer,\n client_info.device_model AS device_model,\n client_info.locale AS locale,\n client_info.os AS os,\n client_info.os_version AS os_version,\n client_info.android_sdk_version AS android_sdk_version,\n NULL AS debug_tag,\n UNIX_SECONDS(PARSE_TIMESTAMP('%F%Ez', client_info.first_run_date)) AS installation_date,\n NULL AS home_directory,\n NULL AS custom_targeting_attributes,\n ROW_NUMBER() OVER(PARTITION BY client_info.locale) AS rowno,\n FROM \n org_mozilla_firefox.baseline\n WHERE \n DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)\n -- grabbing @ 100 samples here to ensure we get enough to LIMIT to 20 later\n AND RAND() < 100/(SELECT COUNT(*) FROM org_mozilla_firefox.baseline WHERE DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)) \n), app_contexts AS (\n -- Stripping out the rowno, which is used to ensure we don't have duplicate locales\n -- so that we can match the AppContext object schema\n SELECT\n app_name,\n app_id,\n channel,\n app_version,\n app_build,\n architecture,\n device_manufacturer,\n device_model,\n locale,\n os,\n os_version,\n android_sdk_version,\n debug_tag,\n installation_date,\n home_directory,\n custom_targeting_attributes\n FROM\n randomish_sample\n WHERE\n rowno <= 1\n)\n\nSELECT \n TO_JSON_STRING(t) AS app_context\nFROM \n app_contexts AS t\nLIMIT\n 20",
"query": "-- A query to generate Nimbus application contexts in JSON format for the\n-- purpose of testing client targeting.\n--\n-- The existing app contexts used by the Nimbus Rust SDK are shaped like this:\n--\n-- pub struct AppContext {\n-- pub app_name: String,\n-- pub app_id: String,\n-- pub channel: String,\n-- pub app_version: Option<String>,\n-- pub app_build: Option<String>,\n-- pub architecture: Option<String>,\n-- pub device_manufacturer: Option<String>,\n-- pub device_model: Option<String>,\n-- pub locale: Option<String>,\n-- pub os: Option<String>,\n-- pub os_version: Option<String>,\n-- pub android_sdk_version: Option<String>,\n-- pub debug_tag: Option<String>,\n-- pub installation_date: Option<i64>,\n-- #[serde(flatten)]\n-- pub custom_targeting_attributes: Option<HashMap<String, String>>,\n-- }\n\nWITH randomish_sample AS\n(\n SELECT \n \"fenix\" AS app_name,\n \"org.mozilla.firefox\" AS app_id,\n client_info.app_channel AS channel,\n client_info.app_display_version AS app_version,\n client_info.app_build AS app_build,\n client_info.architecture AS architecture,\n client_info.device_manufacturer AS device_manufacturer,\n client_info.device_model AS device_model,\n client_info.locale AS locale,\n client_info.os AS os,\n client_info.os_version AS os_version,\n client_info.android_sdk_version AS android_sdk_version,\n NULL AS debug_tag,\n UNIX_SECONDS(PARSE_TIMESTAMP('%F%Ez', client_info.first_run_date)) AS installation_date,\n NULL AS custom_targeting_attributes,\n ROW_NUMBER() OVER(PARTITION BY client_info.locale) AS rowno,\n FROM \n org_mozilla_firefox.baseline\n WHERE \n DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)\n -- grabbing @ 100 samples here to ensure we get enough to LIMIT to 20 later\n AND RAND() < 100/(SELECT COUNT(*) FROM org_mozilla_firefox.baseline WHERE DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)) \n), app_contexts AS (\n -- Stripping out the rowno, which is used to ensure we don't have duplicate locales\n -- so that we can match the AppContext object schema\n SELECT\n app_name,\n app_id,\n channel,\n app_version,\n app_build,\n architecture,\n device_manufacturer,\n device_model,\n locale,\n os,\n os_version,\n android_sdk_version,\n debug_tag,\n installation_date,\n custom_targeting_attributes\n FROM\n randomish_sample\n WHERE\n rowno <= 1\n)\n\nSELECT \n TO_JSON_STRING(t) AS app_context\nFROM \n app_contexts AS t\nLIMIT\n 20",
"data": {
"columns": [
{
Expand All @@ -28,8 +28,7 @@
"os_version": "10",
"android_sdk_version": "29",
"debug_tag": null,
"installation_date": 1641967200,
"home_directory": null
"installation_date": 1641967200
}
},
{
Expand All @@ -48,8 +47,7 @@
"os_version": "8.0.0",
"android_sdk_version": "26",
"debug_tag": null,
"installation_date": 1597939200,
"home_directory": null
"installation_date": 1597939200
}
},
{
Expand All @@ -68,8 +66,7 @@
"os_version": "9",
"android_sdk_version": "28",
"debug_tag": null,
"installation_date": 1650405600,
"home_directory": null
"installation_date": 1650405600
}
},
{
Expand All @@ -88,8 +85,7 @@
"os_version": "12",
"android_sdk_version": "31",
"debug_tag": null,
"installation_date": 1651602600,
"home_directory": null
"installation_date": 1651602600
}
},
{
Expand All @@ -108,8 +104,7 @@
"os_version": "12",
"android_sdk_version": "31",
"debug_tag": null,
"installation_date": 1612674000,
"home_directory": null
"installation_date": 1612674000
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ class BaseAppContextDataClass:
android_sdk_version: Optional[str]
debug_tag: Optional[str]
installation_date: Optional[int]
home_directory: Optional[bool]
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def _load_app_context_helper(context):
android_sdk_version=base_app_context.android_sdk_version,
debug_tag=base_app_context.debug_tag,
installation_date=base_app_context.installation_date,
home_directory=base_app_context.home_directory,
custom_targeting_attributes=None,
)

Expand Down
1 change: 0 additions & 1 deletion experimenter/tests/tools/example_app_context.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"android_sdk_version": "31",
"debug_tag": null,
"installation_date": 1612674000,
"home_directory": null,
"custom_targeting_attributes": {},
"additional_targeting": {
"is_already_enrolled": true,
Expand Down
1 change: 0 additions & 1 deletion experimenter/tests/tools/sdk_eval_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def load_context():
android_sdk_version=data["android_sdk_version"],
debug_tag=data["debug_tag"],
installation_date=data["installation_date"],
home_directory=data["home_directory"],
custom_targeting_attributes=None,
)
else:
Expand Down