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

Authv2 / Networking improvements #3820

Merged
merged 10 commits into from
Jan 27, 2025

Conversation

federicocappelli
Copy link
Member

@federicocappelli federicocappelli commented Jan 17, 2025

Task/Issue URL: https://app.asana.com/0/1205842942115003/1209170372758735/f
CC: @miasma13

Description:

  • Small changes for Networking v2 updates
  • Removed Timport TestUtils and replaced with the new dedicate test utils for each package
  • Dependency tree improved by removing NetworkProtection as Core.framework dependency and avoiding runtime issues during testing like:
NetworkProtection NetworkProtectionConnectionBandwidthAnalyzer is implemented in both 
/Core.framework/Core (0x10950f248)
/UnitTests.xctest/UnitTests (0x11873c4e0). One of the two will be used. Which one is undefined.

Steps to test this PR:

  • Pixels can be fired
  • Unit tests work

Definition of Done:


Internal references:

Software Engineering Expectations
Technical Design Template

@@ -416,7 +415,7 @@ extension Pixel {
case networkProtectionTunnelFailureDetected
case networkProtectionTunnelFailureRecovered

case networkProtectionLatency(quality: NetworkProtectionLatencyMonitor.ConnectionQuality)
case networkProtectionLatency(quality: String)
Copy link
Member Author

Choose a reason for hiding this comment

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

Changing just these allows us to remove NetworkProtection as dependency of Core and "flatten" the dependency tree, solving possible runtime issues during testing

Copy link
Member Author

Choose a reason for hiding this comment

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

@diegoreymendez Do you have anything against this change? I can explain the rationale if needed.

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@duckduckgo duckduckgo deleted a comment from github-actions bot Jan 27, 2025
federicocappelli added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Jan 27, 2025
Task/Issue URL:
https://app.asana.com/0/1205842942115003/1209170372758735/f
iOS PR: duckduckgo/iOS#3820
macOS PR: duckduckgo/macos-browser#3746
What kind of version bump will this require?: Major

**Description**:

Networking v2 Improvements
- Introduction of RetryPolicy
- Authentication support improved with refresh callback in case of 401
error
- Equatable conformance
- Hashable Conformance
- APIRequestV2Error Equatable conformance
- New Oauth framework inside Networking v2
- Malicious site protection APIClient updated to Networking v2
- A lot of utilities, moks and improvements added to
`NetworkingTestingUtils`
 
Additional changes include:
- `DecodableHelper` expanded and renamed `CodableHelper`
- `Date` extension with utilities + unit tests
- Rationalisation of the package "Testing Utils" modules, now every
library has its `XYZTestingUtils` module, I removed the generic
`TestingUtils`
@federicocappelli federicocappelli merged commit cf6d456 into main Jan 27, 2025
18 checks passed
@federicocappelli federicocappelli deleted the fcappelli/authv2/networking_improvements branch January 27, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants