diff --git a/mozilla_schema_generator/__main__.py b/mozilla_schema_generator/__main__.py index 98a4a97c..14c2cbcd 100644 --- a/mozilla_schema_generator/__main__.py +++ b/mozilla_schema_generator/__main__.py @@ -238,11 +238,12 @@ def write_schema( continue use_metrics_blocklist = version == 2 or repo["app_id"] in v1_overwrite_allowlist + schema_version = 2 if repo["app_id"] in v1_overwrite_allowlist else version schema_generator = GleanPing( repo, mps_branch=mps_branch, - version=version, + version=schema_version, use_metrics_blocklist=use_metrics_blocklist, ) schemas = schema_generator.generate_schema( diff --git a/mozilla_schema_generator/configs/glean_v1_overwrite_allowlist.yaml b/mozilla_schema_generator/configs/glean_v1_overwrite_allowlist.yaml index 8ef42119..bc10f9c9 100644 --- a/mozilla_schema_generator/configs/glean_v1_overwrite_allowlist.yaml +++ b/mozilla_schema_generator/configs/glean_v1_overwrite_allowlist.yaml @@ -19,8 +19,8 @@ #- net-thunderbird-android-daily #- org-mozilla-connect-firefox #- org-mozilla-fenix -#- org-mozilla-fenix-nightly -#- org-mozilla-fennec-aurora +- org-mozilla-fenix-nightly +- org-mozilla-fennec-aurora #- org-mozilla-firefox #- org-mozilla-firefox-beta #- org-mozilla-firefox-vpn diff --git a/tests/test_glean.py b/tests/test_glean.py index 333bbb0c..947c0e5d 100644 --- a/tests/test_glean.py +++ b/tests/test_glean.py @@ -1468,7 +1468,7 @@ def test_v2_allowlist_overwrite_v1( glean_v2_allowlist, glean_v1_overwrite_allowlist, ): - """Should write only v1 with metrics blocklist when in v1_overwrite allowlist.""" + """Should write v1 with v2 schema and metrics blocklist when in v1_overwrite allowlist.""" repo = {"app_id": "firefox-desktop"} msg_main.write_schema( @@ -1484,7 +1484,7 @@ def test_v2_allowlist_overwrite_v1( assert mock_glean_ping.call_count == 1 mock_glean_ping.assert_any_call( - repo, mps_branch="", version=1, use_metrics_blocklist=True + repo, mps_branch="", version=2, use_metrics_blocklist=True ) @patch("mozilla_schema_generator.__main__.dump_schema")