David Dworken
8443292070
Augment IsOfflineError(err) so that it detects if the hishtory server is down, and will then treat all API errors as offline errors
2023-09-23 16:40:03 -07:00
David Dworken
bd03f90b0b
Increase go version in pre-commit for staticcheck
2023-09-23 13:07:50 -07:00
David Dworken
2ad06d1cb2
Install deps for pre-commit
2023-09-23 13:03:54 -07:00
David Dworken
05c6cf8833
Capitalize github action name for consistency
2023-09-23 12:47:50 -07:00
David Dworken
2608230ec7
Add github action for pre-commit enforcement
2023-09-23 12:46:16 -07:00
David Dworken
ab12fa4d47
Fix consistency bug where ClientConfig would get out of date between different parts of the code
2023-09-23 12:40:57 -07:00
David Dworken
8c239a32b9
Rename variable so it doesn't contain TODO
2023-09-23 12:25:58 -07:00
David Dworken
4006eef1e1
Fix bug where requests missing the X-Hishtory-Version header wouldn't get dump/deletion requests (which caused tests to fail since the tests don't set this header)
2023-09-23 12:23:42 -07:00
David Dworken
c00e5d357e
Swap hishtory import to use iterators to improve import performance for #93
2023-09-23 12:19:06 -07:00
David Dworken
b5db10d56a
Update submission endpoint to only include dump and deletion requests if the request is from a modern client, and update it to increment the relevant counters
2023-09-23 11:34:56 -07:00
David Dworken
47bdc966b2
Add GreaterThan method for comparing versions
2023-09-23 11:34:02 -07:00
David Dworken
6cfbec4823
Add struct + functions for parsing hishtory versions
2023-09-23 11:23:47 -07:00
David Dworken
eb1bc99a22
Add extra delay for testTui_delete test that relies on syncing, which can be slow
2023-09-23 10:58:48 -07:00
David Dworken
68c6bd6654
Improve TestTimestampFormat
2023-09-23 10:56:27 -07:00
David Dworken
e886763144
Make testCustomColumns simpler and more reliable
2023-09-23 05:34:36 -07:00
David Dworken
eb85f9a293
Revert "Remove TODO: I think this isn't worth implementing since in the long term, clients will update and this branch will not be necessary (and thus will primarily be tech debt)"
...
This reverts commit bbfda0be96
.
2023-09-22 21:20:53 -07:00
David Dworken
61c8e26f89
Revert "Make testControlR more reliable by making it more lenient in how it looks for the separator"
...
This reverts commit 5168efb2c8
.
2023-09-22 21:18:29 -07:00
David Dworken
d613c22e50
Move a bunch of utility functions for tests to a testutils.go file to make client_test.go at least a little shorter
2023-09-22 20:19:12 -07:00
David Dworken
55a45fe8bd
Increase test timeout since macos tests sometimes just barely go over 45 minutes for the whole test suite--and yes... that is very slow :(
2023-09-22 20:04:40 -07:00
David Dworken
5168efb2c8
Make testControlR more reliable by making it more lenient in how it looks for the separator
2023-09-22 20:03:41 -07:00
David Dworken
51ca2578b7
Follow up to e3d54e: Same thing for querying for pre-saved entries
2023-09-22 19:59:19 -07:00
David Dworken
e3d54e43e8
Make deletion request auto-retry SQLITE_LOCKED errors since deletion requests will now be much more common with pre-saving support
2023-09-22 19:47:10 -07:00
David Dworken
8bb02ea88c
Merge pull request #111 from ddworken/sync-bug
...
Fix bug in offline syncing resumption
2023-09-22 19:35:38 -07:00
David Dworken
2c9aa099d2
Fix bug in offline sync code that contained off-by-one error leading to missed entries
2023-09-22 19:31:22 -07:00
David Dworken
e089690cbb
no-op formatting change
2023-09-22 19:22:03 -07:00
David Dworken
bbfda0be96
Remove TODO: I think this isn't worth implementing since in the long term, clients will update and this branch will not be necessary (and thus will primarily be tech debt)
2023-09-22 19:20:51 -07:00
David Dworken
5bdbd9b262
Revert increased read_count requirement for deletion requests since deleting via encrypted-ID should be reliable
2023-09-22 19:19:06 -07:00
David Dworken
cc11916f3c
Create func to automatically create DB indexes rather than just documenting them in a comment that has to be manually executed
2023-09-22 19:11:43 -07:00
David Dworken
51f2c15f35
Add index for deletion requests now that the volume of deletion requests will increase
2023-09-22 19:01:27 -07:00
David Dworken
3f0adbc324
Add support for deleting pre-saved entries on the remote server
2023-09-22 19:00:37 -07:00
David Dworken
8c6443ed07
Fix incorrect column name
2023-09-22 18:59:37 -07:00
David Dworken
1d878195b2
Rework ff98a7907c
to use the newly added EntryId column rather than deleting based on the start time
2023-09-22 14:03:41 -07:00
David Dworken
9b847c5e35
Further optimize client-server roundtrips by including deletion and dump requests in submit responses (follow up to 1e43de689f
)
2023-09-22 13:49:29 -07:00
David Dworken
a5f11af150
Add initial code to support unique per-entry IDs
...
This code has two caveats for old entries:
1. the ID is being backfiled with a random per-(device,entry) ID. So the ID won't match cross-device.
2. the server-side ID will still be a random ID that is unrelated to the entry ID
2023-09-22 13:16:24 -07:00
David Dworken
2a5a6d65c4
Roll-forward "Add preliminary support for persisting pre-saved history entries remotely"
...
This rolls-forward commit 66916c27cb
.
2023-09-22 13:13:46 -07:00
David Dworken
dc166ec089
Move fuzz tests to a separate file and add a couple more tests to it
2023-09-22 08:43:58 -07:00
David Dworken
66916c27cb
Revert "Add preliminary support for persisting pre-saved history entries remotely"
...
This reverts commit ff98a7907c
. That commit is incomplete since it doesn't include support for the continous deletion of pre-saved history entries as soon as they
finish running. Support for this will require a good bit more work/thought, so reverting for and keeping this code in the git history.
2023-09-21 12:39:20 -07:00
David Dworken
ff98a7907c
Add preliminary support for persisting pre-saved history entries remotely
2023-09-21 12:39:04 -07:00
David Dworken
a3b865fa6b
Move all handlers into either api_handlers.go for client-exposed handlers, or debug_handlers.go for debug/admin functionality
2023-09-21 11:47:16 -07:00
David Dworken
9fc1140ab9
Swap json decoding to Decoder API for shorter/clearer code
2023-09-21 11:42:02 -07:00
David Dworken
63dea34007
Add comment to document a somewhat confusing function
2023-09-21 11:35:47 -07:00
David Dworken
1e43de689f
Optimize number of round-trip HTTP connections made by the client by having the submit handler return metadata about whether there are pending dump/deletion requests
...
For now, I'm still keeping the dedicated endpoints for those functionalities, but since most of the time there are no dump/deletion requests this should cut down the number of requests made by the client by 2/3.
2023-09-21 11:35:24 -07:00
David Dworken
b05fb0f818
Fix typo-ed variable name
2023-09-21 11:25:26 -07:00
David Dworken
c08c9d68ff
Add comments for shared data structures
2023-09-21 10:21:07 -07:00
David Dworken
824fffc14f
Release v0.221
2023-09-19 21:17:00 -07:00
David Dworken
49e2a75ceb
Release v0.220
2023-09-19 19:03:36 -07:00
David Dworken
1c4570586c
Increase max supported line length for #93
2023-09-19 18:59:09 -07:00
David Dworken
296bbc33e7
Release v0.219
2023-09-19 18:54:35 -07:00
David Dworken
ac5131fe4b
Add netbsd binary for #87
2023-09-19 18:54:04 -07:00
David Dworken
908995afdc
Release v0.218
2023-09-19 18:44:50 -07:00