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

VPN server failure recovery pixels + reasserting fix #791

Conversation

graeme
Copy link
Contributor

@graeme graeme commented Apr 23, 2024

Required:

Task/Issue URL: https://app.asana.com/0/0/1206939413299475/f
iOS PR: duckduckgo/iOS#2779
macOS PR: https://github.com/duckduckgo/macos-browser/pull/2657
What kind of version bump will this require?: Major

Description:

Adds Pixels described in the task to monitor how often VPN server failure recovery is happening and succeeding.

Steps to test this PR:

  1. Follow steps in https://app.asana.com/0/72649045549333/1207063933755975/f
  2. Check that the right pixel appears in the console after each step.

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16
  • macOS 10.15
  • macOS 11
  • macOS 12

Internal references:

Software Engineering Expectations
Technical Design Template

@graeme graeme changed the base branch from main to graeme/vpn-server-failure-recovery-retry-logic April 23, 2024 12:21
@graeme graeme changed the base branch from graeme/vpn-server-failure-recovery-retry-logic to main April 23, 2024 12:26
@graeme graeme changed the base branch from main to graeme/vpn-server-failure-recovery-retry-logic April 23, 2024 12:27
@graeme graeme force-pushed the graeme/vpn-server-failure-recovery-retry-logic branch from 9e2c20e to cb69e94 Compare April 23, 2024 12:29
@graeme graeme force-pushed the graeme/vpn-server-failure-recovery-pixels branch from f448f67 to eb466b4 Compare April 23, 2024 12:32
@graeme graeme marked this pull request as ready for review April 23, 2024 13:48
@graeme graeme mentioned this pull request Apr 23, 2024
6 tasks
@graeme graeme force-pushed the graeme/vpn-server-failure-recovery-pixels branch from eb466b4 to d4338ca Compare April 24, 2024 10:05
@@ -846,8 +847,7 @@ open class PacketTunnelProvider: NEPacketTunnelProvider {
// MARK: - App Messages

// swiftlint:disable:next cyclomatic_complexity
@MainActor
public override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)? = nil) {
@MainActor public override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)? = nil) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annotation line was confusing swiftlint

@graeme graeme changed the title VPN server failure recovery pixels VPN server failure recovery pixels + reasserting fix Apr 24, 2024
@graeme graeme requested a review from quanganhdo April 24, 2024 15:40
@@ -53,17 +63,21 @@ actor FailureRecoveryHandler: FailureRecoveryHandling {
}

private let deviceManager: NetworkProtectionDeviceManagement
private weak var reassertingControl: Reasserting?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the reasserting control to a. Invert control and improve testability and b. To fix an issue where reconnection wouldn’t happen if there was no update to the config

@graeme
Copy link
Contributor Author

graeme commented Apr 25, 2024

@quanganhdo This has all been merged into #786

@graeme graeme closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant