Skip to content

Commit

Permalink
Bump FXIOS [Dependencies] Glean v63.0.0 & AppServices v135.0.20241212…
Browse files Browse the repository at this point in the history
…150752 (#23561)

* Update to Glean v63.0.0

* Ensure custom pings are registered before Glean.init/reset to unbreak tests

* Auto update SPM with latest rust-component release 135.0.20241212150752

---------

Co-authored-by: Jan-Erik Rediger <[email protected]>
  • Loading branch information
travis79 and badboy authored Dec 12, 2024
1 parent 9872456 commit c5a2ff9
Show file tree
Hide file tree
Showing 31 changed files with 113 additions and 21 deletions.
4 changes: 2 additions & 2 deletions firefox-ios/Client.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25903,15 +25903,15 @@
repositoryURL = "https://github.com/mozilla/rust-components-swift.git";
requirement = {
kind = exactVersion;
version = 135.0.20241211011009;
version = 135.0.20241212150752;
};
};
435C85EE2788F4D00072B526 /* XCRemoteSwiftPackageReference "glean-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mozilla/glean-swift";
requirement = {
kind = exactVersion;
version = 62.0.0;
version = 63.0.0;
};
};
4368F83B279669690013419B /* XCRemoteSwiftPackageReference "SnapKit" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mozilla/glean-swift",
"state" : {
"revision" : "5c614b4af5a1f1ffe23b46bd03696086d8ce9d0d",
"version" : "62.0.0"
"revision" : "be4fbca81f9e1da5f9b91e8bd245a8dee53cc57f",
"version" : "63.0.0"
}
},
{
Expand Down Expand Up @@ -95,8 +95,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mozilla/rust-components-swift.git",
"state" : {
"revision" : "f8f647a7f5aeaf4cf7b5bddab5ff7ff6e5b9dd6f",
"version" : "135.0.20241211011009"
"revision" : "7aa9e55ff0b2e7de3f757fa9ff6dff16f14031cc",
"version" : "135.0.20241212150752"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion firefox-ios/Client/Telemetry/GleanWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct DefaultGleanWrapper: GleanWrapper {
Glean.shared.handleCustomUrl(url: url)
}
func setUpload(isEnabled: Bool) {
Glean.shared.setUploadEnabled(isEnabled)
Glean.shared.setCollectionEnabled(isEnabled)
}
func submitPing() {
GleanMetrics.Pings.shared.firstSession.submit()
Expand Down
2 changes: 1 addition & 1 deletion firefox-ios/bin/sdk_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

set -e

MIN_GLEAN_PARSER_VERSION=15.2
MIN_GLEAN_PARSER_VERSION=16.1

# CMDNAME is used in the usage text below.
# shellcheck disable=SC2034
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class BrowserViewControllerTests: XCTestCase {
super.setUp()
DependencyHelperMock().bootstrapDependencies()
TelemetryContextualIdentifier.setupContextId()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)

profile = MockProfile()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class ContextMenuHelperTests: XCTestCase {

LegacyFeatureFlagsManager.shared.initializeDeveloperFeatures(with: profile)
DependencyHelperMock().bootstrapDependencies()

// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ final class PocketViewModelTests: XCTestCase, FeatureFlaggable {
profile = MockProfile()

featureFlags.initializeDeveloperFeatures(with: profile)
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import XCTest
final class MainMenuMiddlewareTests: XCTestCase {
override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
DependencyHelperMock().bootstrapDependencies()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ class GleanPlumbMessageManagerTests: XCTestCase {

override func setUp() {
super.setUp()

// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
messagingStore = MockGleanPlumbMessageStore(messageId: messageId)
applicationHelper = MockApplicationHelper()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ final class MicrosurveyMiddlewareIntegrationTests: XCTestCase, StoreTestUtility

override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
DependencyHelperMock().bootstrapDependencies()
setupStore()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class OnboardingTelemetryDelegationTests: XCTestCase {

override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
DependencyHelperMock().bootstrapDependencies()
nimbusUtility = NimbusOnboardingTestingConfigUtility()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class OnboardingTelemetryUtilityTests: XCTestCase {

override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
DependencyHelperMock().bootstrapDependencies()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ final class PasswordGeneratorTelemetryTests: XCTestCase {
let telemetry = PasswordGeneratorTelemetry()
override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
DependencyHelperMock().bootstrapDependencies()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class PasswordManagerViewModelTests: XCTestCase {
self.mockDelegate = MockLoginViewModelDelegate()
self.viewModel.delegate = mockDelegate
self.viewModel.setBreachAlertsManager(MockBreachAlertsClient())
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import XCTest
final class PrivateBrowsingTelemetryTests: XCTestCase {
override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ class SponsoredTileTelemetryTests: XCTestCase {
// MARK: Helper methods

func clearTest() {
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)

Glean.shared.resetGlean(clearStores: true)
TelemetryContextualIdentifier.clearUserDefaults()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class TabsTelemetryTests: XCTestCase {
profile = MockProfile()
inactiveTabsManager = MockInactiveTabsManager()
LegacyFeatureFlagsManager.shared.initializeDeveloperFeatures(with: profile)
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
DependencyHelperMock().bootstrapDependencies()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@ class TabToolbarHelperTests: XCTestCase {
}

func testTelemetryForSiteMenu() {
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
let mockToolbar = MockTabToolbar()
_ = TabToolbarHelper(toolbar: mockToolbar)
mockToolbar.tabToolbarDelegate?.tabToolbarDidPressMenu(mockToolbar, button: mockToolbar.appMenuButton)
testCounterMetricRecordingSuccess(metric: GleanMetrics.AppMenu.siteMenu)
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ final class InactiveTabsTelemetryTests: XCTestCase {

override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
subject = InactiveTabsTelemetry()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import XCTest

final class HomepageTelemetryTests: XCTestCase {
override func setUp() {
super.setUp()
super.setUp()// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ final class MainMenuTelemetryTests: XCTestCase {

override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
subject = MainMenuTelemetry()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ final class ToolbarTelemetryTests: XCTestCase {

override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
subject = ToolbarTelemetry()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class TelemetryContextualIdentifierTests: XCTestCase {

// MARK: Helper methods
func clearTest() {
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
TelemetryContextualIdentifier.clearUserDefaults()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class TelemetryWrapperTests: XCTestCase {
override func setUp() {
super.setUp()
DependencyHelperMock().bootstrapDependencies()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
Experiments.events.clearEvents()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class WallpaperSelectorViewModelTests: XCTestCase {

wallpaperManager = WallpaperManagerMock()
addWallpaperCollections()

// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class WallpaperSettingsViewModelTests: XCTestCase {

wallpaperManager = WallpaperManagerMock()
addWallpaperCollections()

// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import XCTest
class WebviewTelemetryTests: XCTestCase {
override func setUp() {
super.setUp()
// Due to changes allow certain custom pings to implement their own opt-out
// independent of Glean, custom pings may need to be registered manually in
// tests in order to puth them in a state in which they can collect data.
Glean.shared.registerPings(GleanMetrics.Pings.shared)
Glean.shared.resetGlean(clearStores: true)
}

Expand Down
4 changes: 2 additions & 2 deletions focus-ios/Blockzilla.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7168,7 +7168,7 @@
repositoryURL = "https://github.com/mozilla/rust-components-swift";
requirement = {
kind = exactVersion;
version = 135.0.20241211011009;
version = 135.0.20241212150752;
};
};
8A0E7F2C2BA0F0E0006BC6B6 /* XCRemoteSwiftPackageReference "Fuzi" */ = {
Expand All @@ -7184,7 +7184,7 @@
repositoryURL = "https://github.com/mozilla/glean-swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 62.0.0;
minimumVersion = 63.0.0;
};
};
F8324C2D264C807C007E4BFA /* XCRemoteSwiftPackageReference "SnapKit" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/mozilla/glean-swift",
"state": {
"branch": null,
"revision": "5c614b4af5a1f1ffe23b46bd03696086d8ce9d0d",
"version": "62.0.0"
"revision": "be4fbca81f9e1da5f9b91e8bd245a8dee53cc57f",
"version": "63.0.0"
}
},
{
Expand All @@ -51,8 +51,8 @@
"repositoryURL": "https://github.com/mozilla/rust-components-swift",
"state": {
"branch": null,
"revision": "f8f647a7f5aeaf4cf7b5bddab5ff7ff6e5b9dd6f",
"version": "135.0.20241211011009"
"revision": "7aa9e55ff0b2e7de3f757fa9ff6dff16f14031cc",
"version": "135.0.20241212150752"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ class SettingsViewController: UIViewController, UITableViewDataSource, UITableVi

// The following settings are special and need to be in effect immediately.
if toggle.setting == .sendAnonymousUsageData {
Glean.shared.setUploadEnabled(sender.isOn)
Glean.shared.setCollectionEnabled(sender.isOn)
if !sender.isOn {
NimbusWrapper.shared.nimbus.resetTelemetryIdentifiers()
}
Expand Down
2 changes: 1 addition & 1 deletion focus-ios/bin/sdk_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

set -e

GLEAN_PARSER_VERSION=15.0
GLEAN_PARSER_VERSION=16.1

# CMDNAME is used in the usage text below.
# shellcheck disable=SC2034
Expand Down

0 comments on commit c5a2ff9

Please sign in to comment.