HomePhabricator
Diffusion Comm a6d57e48b7f9

Read desktop code version during socket connection creation

Description

Read desktop code version during socket connection creation

Summary:
This differential resolves urgent issue available under: https://linear.app/comm/issue/ENG-6007/macos-desktop-version-is-not-actually-exported-to-the-keyserver.
The issue consisted of 3 parts:

  1. During socket connection creation the keyserver simply ignored potential majorDesktopVersion field.
  2. The code in message-creator.js tried to read desktop code version from the database by looking for desktopCodeVersion field in fetched rows while it was actually persisted as majorDesktopVersion.
  3. Finally versionKeyRegex allowed exclusively strings in <number>|<number> format but we need it to allow <number>|<number>|<number> as well.

This differential addresses each of the issues listed above.

Test Plan:

  1. Build desktop app connected to your local keyserver.
  2. Ensure that olm sessions are present both in MariaDB and IndexedDB.
  3. Send some notifications and ensure that version field is incremented with each notification.

Repeat for both dev and prod (testing for prod will require to remove isStaffOrDev condition).
Execute similar test for web and native (for native ignore IndexedDB check) in order to test that functionality for this platforms is not broken.

It is essential to note that my initial testing plans for the entire e2e MacOS notifications assumed that NEXT_CODE_VERSION was temporarily updated to 0 which was the root of the issue this differential resolves. This testing plan assumes that no changes to NEXT_CODE_VERSION are done and that it is executed on the master code as it is.

Reviewers: michal, kamil

Reviewed By: michal

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10151

Details

Provenance
marcinAuthored on Dec 4 2023, 5:18 AM
Reviewer
michal
Differential Revision
D10151: Read desktop code version during socket connection creation
Parents
rCOMMd1d9a6b3be86: [Identity] Use clap for argument parsing
Branches
Unknown
Tags
Unknown