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

libQuic integration via libSession #960

Merged
merged 55 commits into from
May 13, 2024

Conversation

mpretty-cyro
Copy link
Collaborator

@mpretty-cyro mpretty-cyro commented Apr 4, 2024

The main changes in the PR are around reworking the majority of the networking to be run via libQuic:

  • Updated the code to use libQuic for network requests
  • Moved the snode cache and path building into libSession (deleted associated logic)
  • Moved reachability detection into libSession (remove Reachability dependency)

But it also includes a number of general fixes:

  • Added logic to include logs from the Notification & Share extension within the device logs to help debugging when they are shared
  • Added the ability to define a unique hash for a job for deduplication
  • Updated CI scripts to more properly clean up simulator
  • Updated a number of errors to be more easily converted to strings
  • Updated the app versioning to be at the project level instead of target level
  • Updated GRDB and SQLCipher
  • Reworked the keyboard avoidance in ConversationVC to fix some bugs and simplify the behaviour
  • Tweaked the polling logic to split the user, groups and community pollers into separate queues
  • Tweaked the logic to restart the open group poller immediately after joining a community (to avoid an edge-case where there could be a long delay before the initial poll is made)
  • Tweaked the logic for checking if PNs are susceptible to failure to only dispatch to the main thread once
  • Moved the message request footer UI into it's own view
  • Moved the ThreadSettingsViewModel code into a separate function to fix a compilation issue
  • Removed the session id from the message snippet in the conversation list
  • Cleaned up some warnings
  • Fixed an issue where the DisappearingMessagesJob was getting run for every individual message process instead of just once after processing all messages from a poll
  • Fixed a bug where community invite messages have the wrong author
  • Fixed a bug where the title on the disappearing messages settings screen was clipping vertically
  • Fixed a bug where tapping on the disappearing messages setting subtitle could incorrectly appear in read-only state for admins
  • Fixed a log which contained notification content
  • Fixed a log that could be thrown incorrectly for a unique constraint failure
  • Fixed an annoying startup warning due to thread priorities
  • Fixed an issue where the message status wouldn't update to the failed state if the MessageSendJob timed-out
  • Fixed an issue where network issues could result in a backlog of TypingIndicator messages that failed to send (don't bother retrying them)
  • Fixed an issue where concurrent jobs might not retry correctly if other jobs don't complete or the retry was triggered from the wrong queue
  • Fixed an issue where the input view could disappear in some cases

@mpretty-cyro mpretty-cyro self-assigned this Apr 4, 2024
mpretty-cyro and others added 14 commits April 4, 2024 13:25
…ration

# Conflicts:
#	Podfile.lock
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/Session-Info.plist
This adds keep-alive scripts to help deal with cleaning up xcode
simulator devices started by CI jobs.

Other changes:
- Change /Users/drone -> /Users/$USER in case we use some other CI
  username in the future.
- Simplify the xcode simulator interaction a bit by using xcode's json
  output + jq to query/manipulate it.
It seems useful to have them run on pushes as well (so that you can push
to a local user branch and have the tests run before PRing it).
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

Attention: Patch coverage is 32.35294% with 2139 lines in your changes are missing coverage. Please review.

Project coverage is 12.28%. Comparing base (5735d48) to head (021d05d).
Report is 14 commits behind head on dev.

❗ Current head 021d05d differs from pull request most recent head 444655f. Consider uploading reports for the commit 444655f to get more accurate results

Files Patch % Lines
...ionSnodeKit/LibSession/LibSession+Networking.swift 25.82% 224 Missing ⚠️
... Receiving/Notifications/PushNotificationAPI.swift 0.00% 139 Missing ⚠️
...sagingKit/Sending & Receiving/Pollers/Poller.swift 0.00% 128 Missing ⚠️
...nversations/Settings/ThreadSettingsViewModel.swift 70.39% 127 Missing ⚠️
...ions/Views & Modals/MessageRequestFooterView.swift 0.00% 112 Missing ⚠️
Session/Conversations/ConversationVC.swift 0.00% 110 Missing ⚠️
...erviceExtension/NotificationServiceExtension.swift 0.00% 99 Missing ⚠️
...agingKit/Sending & Receiving/MessageReceiver.swift 46.75% 82 Missing ⚠️
...it/LibSession/LibSession+SessionMessagingKit.swift 14.60% 76 Missing ⚠️
...eKit/Networking/PreparedRequest+OnionRequest.swift 32.00% 68 Missing ⚠️
... and 98 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #960      +/-   ##
==========================================
+ Coverage   11.62%   12.28%   +0.65%     
==========================================
  Files         649      651       +2     
  Lines       96950    96623     -327     
==========================================
+ Hits        11268    11866     +598     
+ Misses      85682    84757     -925     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

• Moved the 'getSwarm' behaviour into a distinct job to prevent duplicate API calls
• Updated to the latest libSession (fix libQuic crash)
• Updated the JobRunner to support the `runOnceTransient` behaviour and be able to run transient jobs in the app extensions
• Reworked the extension file logging to be written directly to the file in a single operation rather than line-by-line via the logger
• Fixed a bug where community invites has the wrong author
• Fixed a bug where the title on the disappearing messages settings screen was clipping vertically
• Fixed a bug where tapping on the disappearing messages setting subtitle could incorrectly appear in read-only state for admins
• Fixed a log which contained notification content
• Tweaks to extension logging logic
• Reworked the keyboard avoidance in ConversationVC to fix some bugs and simplify the behaviour
• Moved the message request footer UI into it's own view
• Fixed an issue where paths wouldn't get built for a new isntall
• Fixed an issue where a couple of LibSession+Networking errors weren't getting logged correctly
• Fixed a log that could be thrown incorrect for a unique constraint failure
• Fixed an annoying startup warning due to thread priorities
• Fixed an issue where the message status wouldn't update to the failed state if the MessageSendJob timed-out
• Fixed an issue where network issues could result in a backlog of TypingIndicator messages that failed to send (don't bother retrying them)
• Fixed an issue where concurrent jobs might not retry correctly if other jobs don't complete or the retry was triggered from the wrong queue
• Fixed an issue where the input view could disappear in some cases
• Moved the snode cache and path building into libSession (deleted associated logic)
• Moved reachability detection into libSession (remove Reachability dependency)
• Fixed a couple of crashes with using libQuic requests
• Fixed a bug where the MessageRequestFooterView would show buttons on outgoing message requests
• Removed the 'runOnceTransient' behaviour (no longer have jobs that run before the user exists)
• Removed the session id from the message snippet in the conversation list
• Fixed an issue where the SyncPushTokensJob might not run because the paths hadn't been built yet
• Fixed a bad memory crash which could occur when returning from the background
• Fixed an issue where config messages were incorrectly getting double wrapped in protobuf wrappers
• Updated GRDB and SQLCipher
• Shifted the ThreadSettingsViewModel code into a separate function to fix a compilation issue
@mpretty-cyro mpretty-cyro merged commit 8276749 into oxen-io:dev May 13, 2024
1 check failed
@mpretty-cyro mpretty-cyro deleted the feature/lib-quic-integration branch May 13, 2024 05:56
@mpretty-cyro mpretty-cyro mentioned this pull request May 13, 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

3 participants