When an attribute is untranslatable, jexl_to_sql drops that clause and returns the rest of the expression instead of returning nothing:
https://github.com/mozilla/experimenter/blob/main/experimenter/experimenter/experiments/jexl*to*sql.py#L337-L347
export_targeting_sql only skips a config when result.sql is None, and ignores result.warnings. So a partially translated expression gets exported and dry-run validated as if it were complete.
For example android_existing_users_not_accepted_terms_of_use is user_accepted_tou == false && days_since_install >= 28, but user_accepted_tou has no column yet (EXP-7326), so what actually gets validated is just daysSinceInstall >= 28. That passes, and the CI output reads as a full pass.
This currently affects 5 of the 18 exported Fenix configs and 4 of the 16 exported iOS configs. Two of the Fenix ones mix && and ||, so dropping a clause changes the shape of the expression rather than just narrowing it.
The dry run can only check syntax and types, so it will never catch this. The fix is to make the skipping visible.
Acceptance criteria:
export_targeting_sql either skips configs that produced warnings, or records the warnings in its JSON output
validate_targeting_sql.py prints how many configs were skipped and which attributes caused it, so the pass count is not mistaken for full coverage
┆Issue is synchronized with this Jira Task
When an attribute is untranslatable,
jexl_to_sqldrops that clause and returns the rest of the expression instead of returning nothing:https://github.com/mozilla/experimenter/blob/main/experimenter/experimenter/experiments/jexl*to*sql.py#L337-L347
export_targeting_sqlonly skips a config whenresult.sqlisNone, and ignoresresult.warnings. So a partially translated expression gets exported and dry-run validated as if it were complete.For example
android_existing_users_not_accepted_terms_of_useisuser_accepted_tou == false && days_since_install >= 28, butuser_accepted_touhas no column yet (EXP-7326), so what actually gets validated is justdaysSinceInstall >= 28. That passes, and the CI output reads as a full pass.This currently affects 5 of the 18 exported Fenix configs and 4 of the 16 exported iOS configs. Two of the Fenix ones mix
&&and||, so dropping a clause changes the shape of the expression rather than just narrowing it.The dry run can only check syntax and types, so it will never catch this. The fix is to make the skipping visible.
Acceptance criteria:
export_targeting_sqleither skips configs that produced warnings, or records the warnings in its JSON outputvalidate_targeting_sql.pyprints how many configs were skipped and which attributes caused it, so the pass count is not mistaken for full coverage┆Issue is synchronized with this Jira Task