Skip to content

Commit 1703043

Browse files
github-actions[bot]Firefox Sync Engineering
andauthored
Auto update with latest AS Release v94.1.0 (#73)
* Updates Package.swift with v94.1.0 release * Version 94.1.0 Co-authored-by: Firefox Sync Engineering <[email protected]>
1 parent d86f85a commit 1703043

File tree

5 files changed

+83
-7
lines changed

5 files changed

+83
-7
lines changed

Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// swift-tools-version:5.4
22
import PackageDescription
33

4-
let checksum = "3db99d66288f471da92fc9b6849208096e568529b1d9bf88a772a490c512e82e"
5-
let version = "v94.0.0"
4+
let checksum = "b665ab1f5371f5c14874763cfb135b953a58414e678027a5cacfcac81b3b0386"
5+
let version = "v94.1.0"
66
let url = "https://github.com/mozilla/application-services/releases/download/\(version)/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "add012de5e5695719d462be3b276554490d266ffd6ed6001b6c92c14f4032d43"
9+
let focusChecksum = "22a2aaa44d25046fa1f5b5f9834cf4b2cba045e125b998f9f8096cd5ba639358"
1010
let focusUrl = "https://github.com/mozilla/application-services/releases/download/\(version)/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",

swift-source/all/Generated/Metrics/Metrics.swift

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension GleanMetrics {
2222
// Intentionally left private, no external user can instantiate a new global object.
2323
}
2424

25-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 8, day: 5, hour: 19, minute: 16, second: 22))
25+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 8, day: 18, hour: 19, minute: 52, second: 20))
2626
}
2727

2828
enum NimbusEvents {
@@ -172,4 +172,34 @@ extension GleanMetrics {
172172

173173
}
174174

175+
enum NimbusHealth {
176+
struct FeatureRequestErrorExtra: EventExtras {
177+
var featureId: String?
178+
179+
func toExtraRecord() -> [String: String] {
180+
var record = [String: String]()
181+
182+
if let featureId = self.featureId {
183+
record["feature_id"] = String(featureId)
184+
}
185+
186+
return record
187+
}
188+
}
189+
190+
/// Recorded when an application or library requests a feature configuration prior
191+
/// to Nimbus initialization.
192+
static let featureRequestError = EventMetricType<NoExtraKeys, FeatureRequestErrorExtra>( // generated from nimbus_health.feature_request_error
193+
CommonMetricData(
194+
category: "nimbus_health",
195+
name: "feature_request_error",
196+
sendInPings: ["events"],
197+
lifetime: .ping,
198+
disabled: false
199+
)
200+
, ["feature_id"]
201+
)
202+
203+
}
204+
175205
}

swift-source/all/Nimbus/FeatureHolder.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44
import Foundation
5+
import Glean
56

67
public typealias GetSdk = () -> FeaturesInterface?
78

@@ -42,7 +43,14 @@ public class FeatureHolder<T> {
4243
if let v = cachedValue {
4344
return v
4445
}
45-
let variables = getSdk()?.getVariables(featureId: featureId, sendExposureEvent: false) ?? NilVariables.instance
46+
var variables: Variables = NilVariables.instance
47+
if let sdk = getSdk() {
48+
variables = sdk.getVariables(featureId: featureId, sendExposureEvent: false) ?? NilVariables.instance
49+
} else {
50+
GleanMetrics.NimbusHealth.featureRequestError.record(GleanMetrics.NimbusHealth.FeatureRequestErrorExtra(
51+
featureId: featureId
52+
))
53+
}
4654
let v = create(variables)
4755
cachedValue = v
4856
return v

swift-source/focus/Generated/Metrics/Metrics.swift

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension GleanMetrics {
2222
// Intentionally left private, no external user can instantiate a new global object.
2323
}
2424

25-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 8, day: 5, hour: 19, minute: 16, second: 58))
25+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 8, day: 18, hour: 19, minute: 54, second: 27))
2626
}
2727

2828
enum NimbusEvents {
@@ -172,4 +172,34 @@ extension GleanMetrics {
172172

173173
}
174174

175+
enum NimbusHealth {
176+
struct FeatureRequestErrorExtra: EventExtras {
177+
var featureId: String?
178+
179+
func toExtraRecord() -> [String: String] {
180+
var record = [String: String]()
181+
182+
if let featureId = self.featureId {
183+
record["feature_id"] = String(featureId)
184+
}
185+
186+
return record
187+
}
188+
}
189+
190+
/// Recorded when an application or library requests a feature configuration prior
191+
/// to Nimbus initialization.
192+
static let featureRequestError = EventMetricType<NoExtraKeys, FeatureRequestErrorExtra>( // generated from nimbus_health.feature_request_error
193+
CommonMetricData(
194+
category: "nimbus_health",
195+
name: "feature_request_error",
196+
sendInPings: ["events"],
197+
lifetime: .ping,
198+
disabled: false
199+
)
200+
, ["feature_id"]
201+
)
202+
203+
}
204+
175205
}

swift-source/focus/Nimbus/FeatureHolder.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44
import Foundation
5+
import Glean
56

67
public typealias GetSdk = () -> FeaturesInterface?
78

@@ -42,7 +43,14 @@ public class FeatureHolder<T> {
4243
if let v = cachedValue {
4344
return v
4445
}
45-
let variables = getSdk()?.getVariables(featureId: featureId, sendExposureEvent: false) ?? NilVariables.instance
46+
var variables: Variables = NilVariables.instance
47+
if let sdk = getSdk() {
48+
variables = sdk.getVariables(featureId: featureId, sendExposureEvent: false) ?? NilVariables.instance
49+
} else {
50+
GleanMetrics.NimbusHealth.featureRequestError.record(GleanMetrics.NimbusHealth.FeatureRequestErrorExtra(
51+
featureId: featureId
52+
))
53+
}
4654
let v = create(variables)
4755
cachedValue = v
4856
return v

0 commit comments

Comments
 (0)