Commit Graph

49 Commits

Author SHA1 Message Date
Max Radermacher
112dd440ad
Prefer OWSGenericError in a few places 2026-01-23 20:15:42 -06:00
Max Radermacher
ddcec0854f
Remove unused NSSecureCoding conformances 2026-01-12 18:17:32 -06:00
Sasha Weiss
d267ec8305
Run swiftformat . 2025-12-30 11:34:05 -08:00
Max Radermacher
3e22dd19c7 Replace two comments with “use web socket” checks 2025-07-30 11:25:42 -05:00
Sasha Weiss
bb048e8b59
One transaction type to rule them all and in the darkness bind them 2025-03-13 21:43:35 -07:00
Max Radermacher
23f0d543ac
Remove handling for unsupported messages 2025-02-11 14:32:26 -06:00
Max Radermacher
e2dd33d53b
Asyncify MessageSenderJobQueue 2024-12-18 12:32:40 -06:00
Max Radermacher
d086376fcf
Improve MessageSenderJobQueue fetching 2024-10-28 21:25:40 -05:00
Max Radermacher
4281cc9a5b
Clean up MessageSenderJobQueue 2024-10-25 13:24:11 -05:00
Ehren Kret
de32c7799d remove NSObject and Dependencies extension computed vars for SignalServiceKit 2024-10-11 23:12:59 -05:00
Harry Sanabria
d43b2846b0 Pass AppReadiness to JobQueue methods 2024-09-27 16:30:12 -07:00
Harry Sanabria
044f277a28 Pass AppReadiness instance to a ton of classes that need to retain it as an instance var 2024-09-27 15:03:52 -07:00
Ehren Kret
cb27389cef enable swiftlint mark rule 2024-08-30 22:05:59 -05:00
Sasha Weiss
6ff76dd7e6
Do away with some ObjC test infra 2024-05-06 09:57:21 -07:00
Harry
6acaf28187
Clean up PreparedOutgoingMessage 2024-04-04 12:55:20 -07:00
Harry
71f06fc3c2
Remove OutgoingMessagePreparer from MessageSendJobQueue 2024-03-28 10:38:12 -07:00
Max Radermacher
64b970f40d
Consolidate initialization code in AppSetup 2024-03-12 16:39:49 -05:00
Max Radermacher
89ddc81b0c
Add initial JobQueueRunner implementation 2023-12-12 13:34:46 -06:00
Max Radermacher
6d16de2522
Change how job queue labels are specified 2023-12-11 13:39:48 -06:00
Max Radermacher
f848a6373f
Swiftify the rest of MessageSender 2023-11-27 11:29:23 -06:00
Sasha Weiss
7f41ecaa8b
Support SEPA bank transfer donations 2023-11-06 13:49:40 -08:00
Sasha Weiss
88f304b0c9
Prune orphaned job records 2023-05-10 14:32:22 -07:00
Sasha Weiss
c9fbc9a9ee
Migrate SSKJobRecord and subclasses to SDSCodableModel using factory init 2023-04-13 10:57:48 -07:00
Max Radermacher
0598c3f9b9
Clean up JobRecordFinder 2023-02-22 13:54:56 -08:00
Max Radermacher
a4889b7fa2 Reduce flakiness of MessageSenderJobQueueTest 2023-01-13 12:51:41 -08:00
Evan Hahn
370ff654e7
Change license to AGPL
Change license to AGPL

This commit:

- Updates the `LICENSE` file

- Start every file with something like:

      // Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
      // SPDX-License-Identifier: AGPL-3.0-only

---

First, I removed existing license headers with this Ruby 3.1.2 script:

    require 'set'

    EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']

    same = 0
    different = 0

    all_files = `git ls-files`.lines.map { |line| line.strip }
    all_files.each do |relative_path|
      if relative_path == 'Pods'
        next
      end

      unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
        next
      end

      path = File.expand_path(relative_path)

      contents = File.read(path)
      new_contents = contents.sub(/\/\/\n\/\/  Copyright .*\n\/\/\n\n/, '')

      if contents == new_contents
        same += 1
      else
        different += 1
      end

      File.write(path, new_contents)
    end

    puts "updated #{different} file(s), left #{same} untouched"

I'm sure this script could be improved, but it worked well enough.

Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.

Then I fixed some stragglers and updated the precommit script.

See [a similar change in the Desktop app][0].

[0]: 8bfaf598af
2022-10-13 08:25:37 -05:00
Evan Hahn
09a279e55d Swiftify fake message sender
This should only affect tests.

This was a pretty mechanical conversion. I removed some unused variables
while I was here, too.
2022-10-05 10:50:53 +00:00
Evan Hahn
a066511a62 Remove useless test setup/teardown
We had a lot of functions like this, which are useless:

    override func setUp() {
        super.setUp()
    }

This removes them.
2022-10-04 14:06:34 -07:00
sashaweiss-signal
efc697af23 Re-order lines in test harness to avoid a race condition 2022-08-24 16:21:13 -07:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Matthew Chen
211b93581b Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Jordan Rose
3d8d96f532 Make test_messageIsSent less flaky by flushing the global queue
A synchronous barrier block will not run until all prior submitted
items run, and all of the work setting up this test is synchronously
submitted to the global background queue.
2020-09-30 12:53:32 -07:00
Matthew Chen
aea5df3625 Try to fix broken test. 2020-09-17 17:30:38 -03:00
Nora Trapp
18e19088a5 Fix broken tests 2020-08-28 13:10:47 -07:00
Nora Trapp
22f7298654 Fix tests 2020-06-01 13:07:56 -07:00
Matthew Chen
5eb2e99ded Respond to CR. 2020-01-24 17:00:50 -03:00
Matthew Chen
a40b9864a6 Improve thread safety of job queues. 2020-01-24 17:00:50 -03:00
Matthew Chen
891c0cb039 Improve thread safety of job queues. 2020-01-24 17:00:50 -03:00
Matthew Chen
013ce2474f Fix test breakage. 2019-08-13 17:33:22 -03:00
Matthew Chen
58eccfe357 Fix test breakage. 2019-08-13 17:03:09 -03:00
Michael Kirk
064438f1ca GRDB handles message send errors 2019-06-03 12:14:12 -06:00
Michael Kirk
7ddb20f00c MessageSenderJobQueueTest uses AnyTransactions 2019-05-30 18:28:06 -06:00
Michael Kirk
fa184fd0b0 fixup message sender queue tests 2019-05-14 15:10:02 -06:00
Michael Kirk
662955832d fix jobqueue tests 2019-05-14 09:30:26 -06:00
Michael Kirk
7cba367c0a reconcile jobqueue tests with NSTimer based retry 2018-11-11 11:31:57 -06:00
Michael Kirk
79bed93b2d reconcile jobqueue with new readiness based setup 2018-11-11 11:28:59 -06:00
Michael Kirk
b8e4bfff86 shuffle isReady->isSetup, centralize starting workStep 2018-10-25 11:56:39 -06:00
Michael Kirk
3560f3be5c Durable send operation
TODO
-[x] respect order of queue
-[x] replacements
  -[x] those w/o completion handler
  -[x] basic send+log operation persists
  -[x] send+ui completion
  -[x] share extension
  -[x] update state jobs
-[x] App Lifecyle
  -[x] settable
  -[x] Mark as ready on startup
  -[x] Fail appropriate jobs on startup

NICE TO HAVE
-[x] concurrent per senders
-[ ] longer retry (e.g. 24hrs)
-[ ] App Lifecyle
  -[x] retry failed jobs on startup?
  -[ ] reachability

DONE
-[x] basic passing test
-[x] datamodel
-[x] queue/classes
2018-10-25 11:54:59 -06:00