Commit Graph

18539 Commits

Author SHA1 Message Date
Matthew Chen
80997f382f Fix feature flags. 2020-07-23 17:23:36 -03:00
Michelle Linington
88f08b64c7 Merge branch 'mlin/PR/IOS-445' 2020-07-22 21:44:14 -07:00
Michelle Linington
7e1345d7d2 PR Feedback: Mark recipients as unregistered earlier
Nora suggested that we also explicitly mark unregistered recipients as
unregistered in response to the message send preparation
ContactDiscoveryOperation.

Also, she found an opportunistic fix to remove the TSInfoMessage on
unregistered recipient failures. This isn't the behavior we want anyway.
2020-07-22 21:27:22 -07:00
Michelle Linington
2b8b716839 Run precommit linter 2020-07-22 21:27:22 -07:00
Michelle Linington
b95df2f5d2 PR feedback: Rethink of message send flow
Changes when we perform a CDS lookup for any phone-number-only
recipients. Now, we do the CDS lookup in a preparation phase prior to
performing the message send.

This also moves some of the error handling within the individual
OWSMessageSend handlers. Now, unregistered recipient handling is
factored out into its own method. _sendMessageToRecipient: will
considered the recipient unregistered if it's missing a UUID.
2020-07-22 21:27:22 -07:00
Michelle Linington
b276e8eb02 IOS-445: Do CDS lookup during message send for recipients without UUID
This adds a new async operation in the message send flow. MessageSender
will now verify that the intended recipients of a message all have UUIDs
before proceeding. If any recipients are missing a UUID, it'll kick off
a CDS lookup for the invalid recipients.

While this code appears to work, this is a first pass. Looking to get
some inital feedback in a pull request. It's unclear to me whether or
not this pattern fits in with the existing error propogation flow in
MessagSender promises. It's also unclear whether or not the error I'm
using is correct.

Some other changes that come along for the ride:
- Add a -perform() method to ContactDiscoveryService to automatically
  submit itself and its dependencies to its static operation queue
2020-07-22 21:27:22 -07:00
Michelle Linington
6e0b388834 Merge branch 'mlin/PR/IOS-631' 2020-07-22 21:20:54 -07:00
Michelle Linington
011457abbc Update Pods submodule commit 2020-07-22 21:17:47 -07:00
Michelle Linington
a967bb12bc PR Feedback:
- Matthew suggested moving all polite readiness blocks to their
  impolite variants. There shouldn't be ordering concerns and message
  processing is important enough to be run impolitely.

- Nora suggested moving some of the message processing checks into
  MessagePipelineSupervisor. Some of the more complex checks like
  registration are out of scope of this change. But -[AppContext
  shouldProcessIncomingMessages] is a minor enough change to include.
  Now, -shouldProcessIncomingMessages is a precondition for
  -isMessageProcessingPermitted

- Matthew suggested that GRDB failures should be fatal. So instead,
  AnySignalRecipientFinder will try! instead of try?.

- Matthew suggested moving some of the MessagePipelineSupervisor
  logging statements to be lower priority.
2020-07-22 21:10:27 -07:00
Michelle Linington
95575ca19b Adds a whole bunch of tests for MessagePipelineSupervisor
- Adopt a local dependency property to fit in with existing style
- Unregister from pipeline supervision in some pipeline stages. This
  usually shouldn't matter since they're all singletons/children of
  singletons. I've only added this to classes that are already
  unregistering existing observations, or don't have any existing
  observations. Anything that was registering and not unregistering,
  I've left as is.
2020-07-22 21:10:27 -07:00
Michelle Linington
e3e903a8ad IOS-631: Suppress message processing pipeline while we have a pending backfill operation
Creates a new root singleton: OWSMessagePipelineSupervisor

As of right now, this singleton has two responsibilities:
- Track all message processing pipeline stages that have registered
  themselves
- Post processing suspension updates to interested stages

Four classes will now register themselves as pipeline stages:
- OWSMessageContentQueue
- YAPDBMessageDecryptQueue
- IncomingGroupsV2MessageQueue
- SSKMessageDecryptJobQueue

At initialization, OWSMessagePipelineSupervisor will take out a pipeline
suspension while it waits for a UUIDBackfillTask to complete. Other
interested objects are also able to suspend the message processing
pipeline by invoking suspendMessageProcessing(for:) on the supervisor
(though, currently this is not used by anything except tests)

This also adds some supporting improvements to UnfairLock. Now,
UnfairLock closures will return the value returned from its critical
section closure.
2020-07-22 21:10:27 -07:00
Nora Trapp
c8d7a453c0 Merge branch 'nt/changelog' 2020-07-22 17:46:58 -07:00
Nora Trapp
655c4c10ce Update changelog for 3.13 2020-07-22 17:46:43 -07:00
Nora Trapp
0878f9156e Add script to update the changelog 2020-07-22 17:46:43 -07:00
Nora Trapp
6d043df8b6 Update to the latest version of fastlane 2020-07-22 17:46:43 -07:00
Nora Trapp
d7c35cef5b Merge branch 'nt/storage-service-unknown-fields' 2020-07-22 14:43:47 -07:00
Nora Trapp
115ea3be12 Force refetch the latest manifest after cleaning up unknown identifiers 2020-07-22 14:43:24 -07:00
Nora Trapp
f2d96d02ec Maintain unknown fields when updating storage records 2020-07-22 14:43:24 -07:00
Nora Trapp
c5214e38b6 Add Codable adherance to proto wrappers 2020-07-22 14:34:24 -07:00
Nora Trapp
c4111f59d0 Generate interface for unknownFields 2020-07-22 14:34:24 -07:00
Nora Trapp
9aa738f89b Merge branch 'nt/storage-service-tweaks6' 2020-07-22 14:33:30 -07:00
Nora Trapp
ee9a56dc4b Clean up orphaned accounts from storage service 2020-07-22 14:33:07 -07:00
Matthew Chen
e01a004ceb Merge branch 'charlesmchen/groupsV2allowChangesFromPendingMembers' 2020-07-22 13:47:03 -03:00
Matthew Chen
d0a674be65 Fix overzealous assert around changes from pending members. 2020-07-22 13:46:21 -03:00
Matthew Chen
153dffac23 Allow debug and internal builds to use gv2 without CDS. 2020-07-22 13:28:57 -03:00
Matthew Chen
e41d53f543 Merge branch 'charlesmchen/reapplyCurrentRevision' 2020-07-22 13:05:51 -03:00
Matthew Chen
9db8e72d52 Re-apply current revision when updating v2 groups in some cases. 2020-07-22 13:05:38 -03:00
Matthew Chen
77f6f53be0 Merge branch 'charlesmchen/remoteConfigForCDSandGroupsV2' 2020-07-22 13:04:43 -03:00
Matthew Chen
639c6a17ee Add remote config for modern CDS and groups v2. 2020-07-22 13:04:33 -03:00
Matthew Chen
c14cc341c4 Add remote config for modern CDS and groups v2. 2020-07-22 13:04:33 -03:00
Matthew Chen
269309de01 Add remote config for modern CDS and groups v2. 2020-07-22 13:04:33 -03:00
Matthew Chen
63040e0ff3 Merge branch 'charlesmchen/groupsV2LegacyGroupIndicator' 2020-07-22 13:03:25 -03:00
Matthew Chen
597486f54a Add MVP legacy group indicator. 2020-07-22 11:49:59 -03:00
Nora Trapp
30e89998da Merge branch 'release/3.13.2' 2020-07-19 15:00:54 -07:00
Nora Trapp
22f889c51e "Bump build to 3.13.2.7." (Internal) 2020-07-17 12:55:13 -07:00
Nora Trapp
7e0eeb07b1 Feature flags for .qa. 2020-07-17 12:55:10 -07:00
Nora Trapp
3f70d61e07 "Bump build to 3.13.2.6." 2020-07-17 12:55:06 -07:00
Nora Trapp
b0de119e6d Feature flags for .production. 2020-07-17 12:55:03 -07:00
Nora Trapp
7fd148a919 Fix a crash on launch effecting some users 2020-07-17 12:47:06 -07:00
Nora Trapp
cf1d9cd003 "Bump build to 3.13.2.5." (Internal) 2020-07-17 12:04:28 -07:00
Nora Trapp
f2fd6d9fcc Feature flags for .qa. 2020-07-17 12:04:25 -07:00
Nora Trapp
7c33a53580 "Bump build to 3.13.2.4." 2020-07-17 12:04:20 -07:00
Nora Trapp
738117f4ad Sync translations 2020-07-17 12:04:17 -07:00
Nora Trapp
acdfa06dbe Feature flags for .production. 2020-07-17 11:58:21 -07:00
Nora Trapp
cbb7504abd Fix rare crash when rendering profile name changes 2020-07-17 11:58:12 -07:00
Nora Trapp
7be50a9642 "Bump build to 3.13.2.3." (Internal) 2020-07-16 16:49:12 -07:00
Nora Trapp
ba994e67af Feature flags for .qa. 2020-07-16 16:49:08 -07:00
Nora Trapp
b4a8c52f90 "Bump build to 3.13.2.2." 2020-07-16 16:49:05 -07:00
Nora Trapp
2f0cee3de3 Feature flags for .production. 2020-07-16 16:48:45 -07:00
Michelle Linington
3dc990b490 Merge branch 'mlin/PR/IOS-662' 2020-07-16 15:47:17 -07:00