From 606594eb5e8b945707aba987c73bc51f3ad8b302 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 26 Nov 2019 15:02:01 +0100 Subject: [PATCH 1/6] Add a new flag to pings: send_if_empty --- .../telemetry/glean/private/PingType.kt | 6 +++-- .../telemetry/glean/rust/LibGleanFFI.kt | 2 +- glean-core/examples/sample.rs | 4 ++-- glean-core/ffi/examples/glean_app.c | 2 +- glean-core/ffi/glean.h | 2 +- glean-core/ffi/src/ping_type.rs | 12 ++++++++-- glean-core/ios/Glean/GleanFfi.h | 2 +- glean-core/ios/Glean/Metrics/Ping.swift | 4 ++-- glean-core/python/glean/metrics/ping.py | 2 +- glean-core/src/lib.rs | 2 +- glean-core/src/metrics/ping.rs | 5 +++- glean-core/src/ping/mod.rs | 2 +- glean-core/tests/event.rs | 2 +- glean-core/tests/ping.rs | 24 +++++++++++++++++-- glean-core/tests/ping_maker.rs | 14 +++++------ 15 files changed, 59 insertions(+), 26 deletions(-) diff --git a/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt b/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt index d1f89e2781..597c31f013 100644 --- a/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt +++ b/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt @@ -17,14 +17,16 @@ import mozilla.telemetry.glean.rust.toByte */ class PingType( internal val name: String, - includeClientId: Boolean + includeClientId: Boolean, + sendIfEmpty: Boolean = false ) { internal var handle: Long init { this.handle = LibGleanFFI.INSTANCE.glean_new_ping_type( name = name, - include_client_id = includeClientId.toByte() + include_client_id = includeClientId.toByte(), + send_if_empty = sendIfEmpty.toByte() ) Glean.registerPingType(this) } diff --git a/glean-core/android/src/main/java/mozilla/telemetry/glean/rust/LibGleanFFI.kt b/glean-core/android/src/main/java/mozilla/telemetry/glean/rust/LibGleanFFI.kt index a0d95e03a5..6f9a6661a0 100644 --- a/glean-core/android/src/main/java/mozilla/telemetry/glean/rust/LibGleanFFI.kt +++ b/glean-core/android/src/main/java/mozilla/telemetry/glean/rust/LibGleanFFI.kt @@ -112,7 +112,7 @@ internal interface LibGleanFFI : Library { // Ping type - fun glean_new_ping_type(name: String, include_client_id: Byte): Long + fun glean_new_ping_type(name: String, include_client_id: Byte, send_if_empty: Byte): Long fun glean_destroy_ping_type(handle: Long) diff --git a/glean-core/examples/sample.rs b/glean-core/examples/sample.rs index 42827d0082..4ed824a016 100644 --- a/glean-core/examples/sample.rs +++ b/glean-core/examples/sample.rs @@ -25,8 +25,8 @@ fn main() { max_events: None, }; let mut glean = Glean::new(cfg).unwrap(); - glean.register_ping_type(&PingType::new("baseline", true)); - glean.register_ping_type(&PingType::new("metrics", true)); + glean.register_ping_type(&PingType::new("baseline", true, false)); + glean.register_ping_type(&PingType::new("metrics", true, false)); let local_metric: StringMetric = StringMetric::new(CommonMetricData { name: "local_metric".into(), diff --git a/glean-core/ffi/examples/glean_app.c b/glean-core/ffi/examples/glean_app.c index ca9f4b6fcc..f9084dbcbf 100644 --- a/glean-core/ffi/examples/glean_app.c +++ b/glean-core/ffi/examples/glean_app.c @@ -15,7 +15,7 @@ int main(void) NULL }; uint64_t glean = glean_initialize(&cfg); - uint64_t store1 = glean_new_ping_type("store1", true); + uint64_t store1 = glean_new_ping_type("store1", true, false); glean_register_ping_type(glean, store1); printf("Glean upload enabled? %d\n", glean_is_upload_enabled(glean)); diff --git a/glean-core/ffi/glean.h b/glean-core/ffi/glean.h index f1794ec854..3ca39c8ce7 100644 --- a/glean-core/ffi/glean.h +++ b/glean-core/ffi/glean.h @@ -313,7 +313,7 @@ uint64_t glean_new_memory_distribution_metric(FfiStr category, uint8_t disabled, int32_t memory_unit); -uint64_t glean_new_ping_type(FfiStr ping_name, uint8_t include_client_id); +uint64_t glean_new_ping_type(FfiStr ping_name, uint8_t include_client_id, uint8_t send_if_empty); uint64_t glean_new_quantity_metric(FfiStr category, FfiStr name, diff --git a/glean-core/ffi/src/ping_type.rs b/glean-core/ffi/src/ping_type.rs index cb0e8c3a39..917ea20010 100644 --- a/glean-core/ffi/src/ping_type.rs +++ b/glean-core/ffi/src/ping_type.rs @@ -17,10 +17,18 @@ lazy_static! { crate::define_infallible_handle_map_deleter!(PING_TYPES, glean_destroy_ping_type); #[no_mangle] -pub extern "C" fn glean_new_ping_type(ping_name: FfiStr, include_client_id: u8) -> u64 { +pub extern "C" fn glean_new_ping_type( + ping_name: FfiStr, + include_client_id: u8, + send_if_empty: u8, +) -> u64 { PING_TYPES.insert_with_log(|| { let ping_name = ping_name.to_string_fallible()?; - Ok(PingType::new(ping_name, include_client_id != 0)) + Ok(PingType::new( + ping_name, + include_client_id != 0, + send_if_empty != 0, + )) }) } diff --git a/glean-core/ios/Glean/GleanFfi.h b/glean-core/ios/Glean/GleanFfi.h index f1794ec854..3ca39c8ce7 100644 --- a/glean-core/ios/Glean/GleanFfi.h +++ b/glean-core/ios/Glean/GleanFfi.h @@ -313,7 +313,7 @@ uint64_t glean_new_memory_distribution_metric(FfiStr category, uint8_t disabled, int32_t memory_unit); -uint64_t glean_new_ping_type(FfiStr ping_name, uint8_t include_client_id); +uint64_t glean_new_ping_type(FfiStr ping_name, uint8_t include_client_id, uint8_t send_if_empty); uint64_t glean_new_quantity_metric(FfiStr category, FfiStr name, diff --git a/glean-core/ios/Glean/Metrics/Ping.swift b/glean-core/ios/Glean/Metrics/Ping.swift index f31c9262b6..b1c48baecd 100644 --- a/glean-core/ios/Glean/Metrics/Ping.swift +++ b/glean-core/ios/Glean/Metrics/Ping.swift @@ -15,10 +15,10 @@ public class Ping { let includeClientId: Bool /// The public constructor used by automatically generated metrics. - public init(name: String, includeClientId: Bool) { + public init(name: String, includeClientId: Bool, sendIfEmpty: Bool = false) { self.name = name self.includeClientId = includeClientId - self.handle = glean_new_ping_type(name, includeClientId.toByte()) + self.handle = glean_new_ping_type(name, includeClientId.toByte(), sendIfEmpty.toByte()) NSLog("Registering this ping: \(name)") Glean.shared.registerPingType(self) } diff --git a/glean-core/python/glean/metrics/ping.py b/glean-core/python/glean/metrics/ping.py index 0e40a107bd..d8625ccfc2 100644 --- a/glean-core/python/glean/metrics/ping.py +++ b/glean-core/python/glean/metrics/ping.py @@ -17,7 +17,7 @@ def __init__(self, name: str, include_client_id: bool): """ self._name = name self._handle = _ffi.lib.glean_new_ping_type( - _ffi.ffi_encode_string(name), include_client_id + _ffi.ffi_encode_string(name), include_client_id, False ) Glean.register_ping_type(self) diff --git a/glean-core/src/lib.rs b/glean-core/src/lib.rs index 1c40f48278..2f64bc1fac 100755 --- a/glean-core/src/lib.rs +++ b/glean-core/src/lib.rs @@ -83,7 +83,7 @@ pub struct Configuration { /// max_events: None, /// }; /// let mut glean = Glean::new(cfg).unwrap(); -/// let ping = PingType::new("sample", true); +/// let ping = PingType::new("sample", true, false); /// glean.register_ping_type(&ping); /// /// let call_counter: CounterMetric = CounterMetric::new(CommonMetricData { diff --git a/glean-core/src/metrics/ping.rs b/glean-core/src/metrics/ping.rs index 203caa97f6..5c48a4a510 100644 --- a/glean-core/src/metrics/ping.rs +++ b/glean-core/src/metrics/ping.rs @@ -15,6 +15,8 @@ pub struct PingType { pub name: String, /// Whether the ping should include the client ID. pub include_client_id: bool, + /// Whether the ping should be sent if it is empty + pub send_if_empty: bool, } impl PingType { @@ -26,10 +28,11 @@ impl PingType { /// * `name` - The name of the ping. /// * `include_client_id` - Whether to include the client ID in the assembled ping when. /// sending. - pub fn new>(name: A, include_client_id: bool) -> Self { + pub fn new>(name: A, include_client_id: bool, send_if_empty: bool) -> Self { Self { name: name.into(), include_client_id, + send_if_empty, } } diff --git a/glean-core/src/ping/mod.rs b/glean-core/src/ping/mod.rs index a36fba44cc..4dd266fac4 100644 --- a/glean-core/src/ping/mod.rs +++ b/glean-core/src/ping/mod.rs @@ -196,7 +196,7 @@ impl PingMaker { let metrics_data = StorageManager.snapshot_as_json(glean.storage(), &ping.name, true); let events_data = glean.event_storage().snapshot_as_json(&ping.name, true); - if metrics_data.is_none() && events_data.is_none() { + if !ping.send_if_empty && metrics_data.is_none() && events_data.is_none() { info!("Storage for {} empty. Bailing out.", ping.name); return None; } diff --git a/glean-core/tests/event.rs b/glean-core/tests/event.rs index a97587a72d..25133debec 100644 --- a/glean-core/tests/event.rs +++ b/glean-core/tests/event.rs @@ -152,7 +152,7 @@ fn test_sending_of_event_ping_when_it_fills_up() { let store_names: Vec = vec!["events".into()]; for store_name in &store_names { - glean.register_ping_type(&PingType::new(store_name.clone(), true)); + glean.register_ping_type(&PingType::new(store_name.clone(), true, false)); } let click = EventMetric::new( diff --git a/glean-core/tests/ping.rs b/glean-core/tests/ping.rs index 5e5e342019..c577c3b641 100644 --- a/glean-core/tests/ping.rs +++ b/glean-core/tests/ping.rs @@ -12,7 +12,7 @@ use glean_core::CommonMetricData; fn write_ping_to_disk() { let (mut glean, _temp) = new_glean(); - let ping = PingType::new("metrics", true); + let ping = PingType::new("metrics", true, false); glean.register_ping_type(&ping); // We need to store a metric as an empty ping is not stored. @@ -33,7 +33,7 @@ fn write_ping_to_disk() { fn disabling_upload_clears_pending_pings() { let (mut glean, _) = new_glean(); - let ping = PingType::new("metrics", true); + let ping = PingType::new("metrics", true, false); glean.register_ping_type(&ping); // We need to store a metric as an empty ping is not stored. @@ -58,3 +58,23 @@ fn disabling_upload_clears_pending_pings() { assert!(ping.send(&glean).unwrap()); assert_eq!(1, get_queued_pings(glean.get_data_path()).unwrap().len()); } + +#[test] +fn empty_pings_with_flag_are_sent() { + let (mut glean, _) = new_glean(); + + let ping1 = PingType::new("custom-ping1", true, true); + glean.register_ping_type(&ping1); + let ping2 = PingType::new("custom-ping2", true, false); + glean.register_ping_type(&ping2); + + // No data is stored in either of the custom pings + + // Sending this should succeed. + assert_eq!(true, ping1.send(&glean).unwrap()); + assert_eq!(1, get_queued_pings(glean.get_data_path()).unwrap().len()); + + // Sending this should fail. + assert_eq!(false, ping2.send(&glean).unwrap()); + assert_eq!(1, get_queued_pings(glean.get_data_path()).unwrap().len()); +} diff --git a/glean-core/tests/ping_maker.rs b/glean-core/tests/ping_maker.rs index 6eb9258282..c19b4c0bc9 100644 --- a/glean-core/tests/ping_maker.rs +++ b/glean-core/tests/ping_maker.rs @@ -21,7 +21,7 @@ fn set_up_basic_ping() -> (Glean, PingMaker, PingType, tempfile::TempDir) { }; let mut glean = Glean::new(cfg).unwrap(); let ping_maker = PingMaker::new(); - let ping_type = PingType::new("store1", true); + let ping_type = PingType::new("store1", true, false); glean.register_ping_type(&ping_type); // Record something, so the ping will have data @@ -88,7 +88,7 @@ fn collect_must_report_none_when_no_data_is_stored() { let (mut glean, ping_maker, ping_type, _t) = set_up_basic_ping(); - let unknown_ping_type = PingType::new("unknown", true); + let unknown_ping_type = PingType::new("unknown", true, false); glean.register_ping_type(&ping_type); assert!(ping_maker.collect(&glean, &unknown_ping_type).is_none()); @@ -110,7 +110,7 @@ fn seq_number_must_be_sequential() { for i in 0..=1 { for ping_name in ["store1", "store2"].iter() { - let ping_type = PingType::new(*ping_name, true); + let ping_type = PingType::new(*ping_name, true, false); let content = ping_maker.collect(&glean, &ping_type).unwrap(); let seq_num = content["ping_info"]["seq"].as_i64().unwrap(); // Ensure sequence numbers in different stores are independent of @@ -121,7 +121,7 @@ fn seq_number_must_be_sequential() { // Test that ping sequence numbers increase independently. { - let ping_type = PingType::new("store1", true); + let ping_type = PingType::new("store1", true, false); // 3rd ping of store1 let content = ping_maker.collect(&glean, &ping_type).unwrap(); @@ -135,7 +135,7 @@ fn seq_number_must_be_sequential() { } { - let ping_type = PingType::new("store2", true); + let ping_type = PingType::new("store2", true, false); // 3rd ping of store2 let content = ping_maker.collect(&glean, &ping_type).unwrap(); @@ -144,7 +144,7 @@ fn seq_number_must_be_sequential() { } { - let ping_type = PingType::new("store1", true); + let ping_type = PingType::new("store1", true, false); // 5th ping of store1 let content = ping_maker.collect(&glean, &ping_type).unwrap(); @@ -157,7 +157,7 @@ fn seq_number_must_be_sequential() { fn test_clear_pending_pings() { let (mut glean, _) = new_glean(); let ping_maker = PingMaker::new(); - let ping_type = PingType::new("store1", true); + let ping_type = PingType::new("store1", true, false); glean.register_ping_type(&ping_type); // Record something, so the ping will have data From a03bcfc5890ac2ad48a5bcf67bda618feb354692 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 27 Nov 2019 10:07:03 +0100 Subject: [PATCH 2/6] Log when ping is sent empty --- glean-core/src/ping/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glean-core/src/ping/mod.rs b/glean-core/src/ping/mod.rs index 4dd266fac4..efe8717d56 100644 --- a/glean-core/src/ping/mod.rs +++ b/glean-core/src/ping/mod.rs @@ -196,9 +196,12 @@ impl PingMaker { let metrics_data = StorageManager.snapshot_as_json(glean.storage(), &ping.name, true); let events_data = glean.event_storage().snapshot_as_json(&ping.name, true); - if !ping.send_if_empty && metrics_data.is_none() && events_data.is_none() { + let is_empty = metrics_data.is_none() && events_data.is_none(); + if !ping.send_if_empty && is_empty { info!("Storage for {} empty. Bailing out.", ping.name); return None; + } else if is_empty { + info!("Storage for {} empty. Ping will still be sent.", ping.name); } let ping_info = self.get_ping_info(glean, &ping.name); From 2b241032a54a249c2e1a1271cc825e69d3f812f4 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 27 Nov 2019 10:07:43 +0100 Subject: [PATCH 3/6] Pass through send_if_empty flag --- glean-core/python/glean/metrics/ping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glean-core/python/glean/metrics/ping.py b/glean-core/python/glean/metrics/ping.py index d8625ccfc2..70ab89cad9 100644 --- a/glean-core/python/glean/metrics/ping.py +++ b/glean-core/python/glean/metrics/ping.py @@ -8,7 +8,7 @@ class PingType: - def __init__(self, name: str, include_client_id: bool): + def __init__(self, name: str, include_client_id: bool, send_if_empty: bool = False): """ This implements the developer facing API for custom pings. @@ -17,7 +17,7 @@ def __init__(self, name: str, include_client_id: bool): """ self._name = name self._handle = _ffi.lib.glean_new_ping_type( - _ffi.ffi_encode_string(name), include_client_id, False + _ffi.ffi_encode_string(name), include_client_id, send_if_empty ) Glean.register_ping_type(self) From 06bd2004dd1244743c1895b380118a172c9bac76 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 27 Nov 2019 11:41:17 +0100 Subject: [PATCH 4/6] Do not provide default value for sendIfEmpty parameter glean_parser enforces a default value. --- .../main/java/mozilla/telemetry/glean/private/PingType.kt | 2 +- .../src/test/java/mozilla/telemetry/glean/GleanTest.kt | 3 ++- .../java/mozilla/telemetry/glean/private/PingTypeTest.kt | 6 ++++-- glean-core/ios/Glean/Metrics/Ping.swift | 2 +- glean-core/ios/GleanTests/Metrics/PingTests.swift | 4 ++-- glean-core/python/glean/_loader.py | 1 + glean-core/python/glean/metrics/ping.py | 2 +- glean-core/python/tests/test_glean.py | 6 +++--- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt b/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt index 597c31f013..909da159c7 100644 --- a/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt +++ b/glean-core/android/src/main/java/mozilla/telemetry/glean/private/PingType.kt @@ -18,7 +18,7 @@ import mozilla.telemetry.glean.rust.toByte class PingType( internal val name: String, includeClientId: Boolean, - sendIfEmpty: Boolean = false + sendIfEmpty: Boolean ) { internal var handle: Long diff --git a/glean-core/android/src/test/java/mozilla/telemetry/glean/GleanTest.kt b/glean-core/android/src/test/java/mozilla/telemetry/glean/GleanTest.kt index d2db3e86cf..9e7e6e2fbf 100644 --- a/glean-core/android/src/test/java/mozilla/telemetry/glean/GleanTest.kt +++ b/glean-core/android/src/test/java/mozilla/telemetry/glean/GleanTest.kt @@ -426,7 +426,8 @@ class GleanTest { val pingName = "custom_ping_1" val ping = PingType( name = pingName, - includeClientId = true + includeClientId = true, + sendIfEmpty = false ) val stringMetric = StringMetricType( disabled = false, diff --git a/glean-core/android/src/test/java/mozilla/telemetry/glean/private/PingTypeTest.kt b/glean-core/android/src/test/java/mozilla/telemetry/glean/private/PingTypeTest.kt index 01da23c357..4366bde918 100644 --- a/glean-core/android/src/test/java/mozilla/telemetry/glean/private/PingTypeTest.kt +++ b/glean-core/android/src/test/java/mozilla/telemetry/glean/private/PingTypeTest.kt @@ -44,7 +44,8 @@ class PingTypeTest { val customPing = PingType( name = "custom", - includeClientId = true + includeClientId = true, + sendIfEmpty = false ) val counter = CounterMetricType( @@ -83,7 +84,8 @@ class PingTypeTest { val customPing = PingType( name = "custom", - includeClientId = false + includeClientId = false, + sendIfEmpty = false ) val counter = CounterMetricType( diff --git a/glean-core/ios/Glean/Metrics/Ping.swift b/glean-core/ios/Glean/Metrics/Ping.swift index b1c48baecd..1c4aae6355 100644 --- a/glean-core/ios/Glean/Metrics/Ping.swift +++ b/glean-core/ios/Glean/Metrics/Ping.swift @@ -15,7 +15,7 @@ public class Ping { let includeClientId: Bool /// The public constructor used by automatically generated metrics. - public init(name: String, includeClientId: Bool, sendIfEmpty: Bool = false) { + public init(name: String, includeClientId: Bool, sendIfEmpty: Bool) { self.name = name self.includeClientId = includeClientId self.handle = glean_new_ping_type(name, includeClientId.toByte(), sendIfEmpty.toByte()) diff --git a/glean-core/ios/GleanTests/Metrics/PingTests.swift b/glean-core/ios/GleanTests/Metrics/PingTests.swift index c2aab2b235..5d4a5b35ca 100644 --- a/glean-core/ios/GleanTests/Metrics/PingTests.swift +++ b/glean-core/ios/GleanTests/Metrics/PingTests.swift @@ -38,7 +38,7 @@ class PingTests: XCTestCase { } func testSendingOfCustomPings() { - let customPing = Ping(name: "custom", includeClientId: true) + let customPing = Ping(name: "custom", includeClientId: true, sendIfEmpty: false) let counter = CounterMetricType( category: "telemetry", @@ -68,7 +68,7 @@ class PingTests: XCTestCase { } func testSendingOfCustomPingsWithoutClientId() { - let customPing = Ping(name: "custom", includeClientId: false) + let customPing = Ping(name: "custom", includeClientId: false, sendIfEmpty: false) let counter = CounterMetricType( category: "telemetry", diff --git a/glean-core/python/glean/_loader.py b/glean-core/python/glean/_loader.py index b2c5219b0e..366284fe10 100644 --- a/glean-core/python/glean/_loader.py +++ b/glean-core/python/glean/_loader.py @@ -38,6 +38,7 @@ "disabled", "histogram_type", "include_client_id", + "send_if_empty", "lifetime", "memory_unit", "name", diff --git a/glean-core/python/glean/metrics/ping.py b/glean-core/python/glean/metrics/ping.py index 70ab89cad9..6d696fb8fe 100644 --- a/glean-core/python/glean/metrics/ping.py +++ b/glean-core/python/glean/metrics/ping.py @@ -8,7 +8,7 @@ class PingType: - def __init__(self, name: str, include_client_id: bool, send_if_empty: bool = False): + def __init__(self, name: str, include_client_id: bool, send_if_empty: bool): """ This implements the developer facing API for custom pings. diff --git a/glean-core/python/tests/test_glean.py b/glean-core/python/tests/test_glean.py index 252fee8f53..a61d024d72 100644 --- a/glean-core/python/tests/test_glean.py +++ b/glean-core/python/tests/test_glean.py @@ -197,7 +197,7 @@ def test_dont_schedule_pings_if_metrics_disabled(safe_httpserver): send_in_pings=["store1"], ) - custom_ping = PingType(name="store1", include_client_id=True) + custom_ping = PingType(name="store1", include_client_id=True, send_if_empty=False) counter_metric.add(10) @@ -211,7 +211,7 @@ def test_dont_schedule_pings_if_metrics_disabled(safe_httpserver): def test_dont_schedule_pings_if_there_is_no_ping_content(safe_httpserver): safe_httpserver.serve_content(b"", code=200) - custom_ping = PingType(name="store1", include_client_id=True) + custom_ping = PingType(name="store1", include_client_id=True, send_if_empty=False) custom_ping.send() @@ -297,7 +297,7 @@ def test_collect(): send_in_pings=["store1"], ) - custom_ping = PingType(name="store1", include_client_id=True) + custom_ping = PingType(name="store1", include_client_id=True, send_if_empty=False) counter_metric.add(10) From a9135aa0f370692d6885c54011b3d1ff1c95afd7 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 27 Nov 2019 11:50:57 +0100 Subject: [PATCH 5/6] Upgrade glean_parser --- glean-core/ios/sdk_generator.sh | 2 +- glean-core/python/setup.py | 2 +- .../telemetry/glean-gradle-plugin/GleanGradlePlugin.groovy | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glean-core/ios/sdk_generator.sh b/glean-core/ios/sdk_generator.sh index 36820bd6ca..84aea2d52b 100755 --- a/glean-core/ios/sdk_generator.sh +++ b/glean-core/ios/sdk_generator.sh @@ -25,7 +25,7 @@ set -e -GLEAN_PARSER_VERSION=1.11.0 +GLEAN_PARSER_VERSION=1.12.0 # When the special argument "internal" is passed, don't add a namespace import and also allow all reserved items. NAMESPACE=Glean diff --git a/glean-core/python/setup.py b/glean-core/python/setup.py index 449237b720..e3928dd257 100644 --- a/glean-core/python/setup.py +++ b/glean-core/python/setup.py @@ -33,7 +33,7 @@ parsed_toml = toml.load(cargo) version = parsed_toml["package"]["version"] -requirements = ["cffi==1.13.1", "glean_parser==1.11.0"] +requirements = ["cffi==1.13.1", "glean_parser==1.12.0"] setup_requirements = [] diff --git a/gradle-plugin/src/main/groovy/mozilla/telemetry/glean-gradle-plugin/GleanGradlePlugin.groovy b/gradle-plugin/src/main/groovy/mozilla/telemetry/glean-gradle-plugin/GleanGradlePlugin.groovy index 469de56b13..c9351578b4 100644 --- a/gradle-plugin/src/main/groovy/mozilla/telemetry/glean-gradle-plugin/GleanGradlePlugin.groovy +++ b/gradle-plugin/src/main/groovy/mozilla/telemetry/glean-gradle-plugin/GleanGradlePlugin.groovy @@ -34,7 +34,7 @@ class GleanMetricsYamlTransform extends ArtifactTransform { @SuppressWarnings("GrPackage") class GleanPlugin implements Plugin { // The version of glean_parser to install from PyPI. - private String GLEAN_PARSER_VERSION = "1.11.0" + private String GLEAN_PARSER_VERSION = "1.12.0" // The version of Miniconda is explicitly specified. // Miniconda3-4.5.12 is known to not work on Windows. private String MINICONDA_VERSION = "4.5.11" From b1a517d706d8f466fccdde0f0b67dd8504e8f75e Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Thu, 28 Nov 2019 11:59:45 +0100 Subject: [PATCH 6/6] Document changes in the changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87b328c755..1e3cd2e1b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ [Full changelog](https://github.com/mozilla/glean/compare/v21.2.0...master) * Timers are reset when disabled. That avoids recording timespans across disabled/enabled toggling. +* Add a new flag to pings: `send_if_empty` +* Upgrade `glean_parser` to v1.12.0` # v21.2.0 (2019-11-21)