Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send failed compilations pixel if needed #2014

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ extension Pixel {
case emailIncontextModalExitEarly
case emailIncontextModalExitEarlyContinue

case compilationFailed
case incrementalRolloutTest
}

Expand Down Expand Up @@ -978,6 +979,7 @@ extension Pixel.Event {
case .emailIncontextModalExitEarly: return "m_email_incontext_modal_exit_early"
case .emailIncontextModalExitEarlyContinue: return "m_email_incontext_modal_exit_early_continue"

case .compilationFailed: return "m_d_compilation_failed"
// MARK: - Return user measurement
case .returnUser: return "m_return_user"
case .debugReturnUserAddATB: return "m_debug_return_user_add_atb"
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8928,7 +8928,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 80.1.0;
version = 80.2.0;
};
};
C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit",
"state": {
"branch": null,
"revision": "e7d516c7f7c2a4c588336afdf8bd2ac48457e1e4",
"version": "80.1.0"
"revision": "2bc934304fd9d5e2b51dfe78a0c95ba10f1ab5a5",
"version": "80.2.0"
}
},
{
Expand Down Expand Up @@ -156,7 +156,7 @@
},
{
"package": "TrackerRadarKit",
"repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit",
"repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git",
"state": {
"branch": null,
"revision": "4684440d03304e7638a2c8086895367e90987463",
Expand Down
12 changes: 11 additions & 1 deletion DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

syncService.scheduler.notifyAppLifecycleEvent()

fireFailedCompilationsPixelIfNeeded()
featureFlagTester.sendFeatureFlagEnabledPixelIfNecessary()
}

Expand Down Expand Up @@ -386,6 +386,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
#endif
}

private func fireFailedCompilationsPixelIfNeeded() {
let store = FailedCompilationsStore()
if store.hasAnyFailures {
DailyPixel.fire(pixel: .compilationFailed, withAdditionalParameters: store.summary) { error in
guard error != nil else { return }
store.cleanup()
}
}
}

private func shouldShowKeyboardOnLaunch() -> Bool {
guard let date = lastBackgroundDate else { return true }
Expand Down