David Dworken
be377dee82
Add TODO
2023-10-30 17:40:47 -07:00
David Dworken
4352f61123
Add automatic retrying of DB functions to fix DB locked errors from hishtory init and hishtory install for #119
2023-10-29 21:13:10 -07:00
David Dworken
2b1af986d8
Add support for running hishtory redact while offline, even though this may lead to syncing inconsistency bugs
2023-10-22 11:43:56 -07:00
David Dworken
c613e696b4
Update hishtory redact so that it doesn't error out due to it redacting the presaved entry for the current command
2023-10-22 11:34:26 -07:00
David Dworken
fdbe91246e
Add another hook point to check HISHTORY_SIMULATE_NETWORK_ERROR so that it also blocks downloading updates
2023-10-22 11:30:49 -07:00
David Dworken
6bb12241c9
Promote the background updates of the DB from BetaMode to prod
2023-10-21 09:47:20 -07:00
David Dworken
58e92e5760
Refactor by moving methods out of lib.go into more specific packages
2023-10-15 18:30:39 -07:00
David Dworken
449a4d0000
Add better handling for race condition with deleting presaved entries
2023-10-15 13:00:34 -07:00
David Dworken
4bcc5fb335
Periodically call query endpoint and retrieve data to ensure that the local DB is always reasonably up to date
2023-10-15 12:29:50 -07:00
David Dworken
fca2b1441f
Always include user and device ID in API request headers, so that they're available in all server-side handlers
2023-10-14 10:52:51 -07:00
David Dworken
851283df8d
Add TODO
2023-10-12 19:34:09 -07:00
David Dworken
253ad7f6b6
Bold matches for search queries in TUI for #112 . This was previously available behind the beta-mode flag, but will now be enabled by default
2023-10-12 19:34:09 -07:00
David Dworken
dc19fa3a17
Roll-forward "Make history entry start times more precise (down to the nanosecond) to make the recorded runtime more accurate, since currently start times are rounded to the nearest second. Though
...
note that 'date' on MacOS doesn't support %N, so this doesn't apply to MacOS"
This reverts commit 6281ae0601
.
2023-10-10 07:44:15 -07:00
David Dworken
f0dbcd6e3b
Add more thorough tests for updates
2023-10-09 21:41:30 -07:00
David Dworken
6281ae0601
Revert "Make history entry start times more precise (down to the nanosecond) to make the recorded runtime more accurate, since currently start times are rounded to the nearest second. Though note that 'date' on MacOS doesn't support %N, so this doesn't apply to MacOS"
...
This reverts commit d404a73c9b
since it appears to be causing test failures for linux
2023-10-07 20:05:21 -07:00
David Dworken
d404a73c9b
Make history entry start times more precise (down to the nanosecond) to make the recorded runtime more accurate, since currently start times are rounded to the nearest second. Though note that 'date' on MacOS doesn't support %N, so this doesn't apply to MacOS
2023-10-07 14:47:54 -07:00
David Dworken
2c77c3d9c9
Fix bug with bash presaving that caused commands to not get properly recorded due to presaving looking like a duplicate command
2023-09-29 21:03:12 -07:00
David Dworken
0b57034c39
Revert "Revert all commits since v0.223 to enable me to release a patch on top of v0.223"
...
This reverts commit 68ed9f2d5d
.
2023-09-29 18:21:23 -07:00
David Dworken
68ed9f2d5d
Revert all commits since v0.223 to enable me to release a patch on top of v0.223
2023-09-28 22:15:30 -07:00
David Dworken
fdec51bd14
Update presaving for bash to use history 1
rather than BASH_COMMAND to ensure we don't log bash functions
2023-09-28 22:14:53 -07:00
David Dworken
89014a8674
Add workaround for bash issues with pre-saving
2023-09-28 22:13:41 -07:00
David Dworken
9fda54d4c2
Remove testutils.Check(t, err) and replace it with require.NoError which gives a clearer error message and a full stacktrace
2023-09-28 22:13:27 -07:00
David Dworken
6d5a86a8bb
Revert all commits since v0.223 to enable me to release a patch on top of v0.223
2023-09-28 21:49:37 -07:00
David Dworken
d14dc1cd50
Update presaving for bash to use history 1
rather than BASH_COMMAND to ensure we don't log bash functions
2023-09-26 19:41:12 -07:00
David Dworken
0db27d4217
Add workaround for bash issues with pre-saving
2023-09-24 16:35:00 -07:00
David Dworken
5121df5a8c
Remove testutils.Check(t, err) and replace it with require.NoError which gives a clearer error message and a full stacktrace
2023-09-24 16:05:01 -07:00
David Dworken
e92c702402
Another exclusion for presaving
2023-09-24 14:19:11 -07:00
David Dworken
c21d443fa6
Make presaving query slightly more specific, and delete res.RowsAffected check since it can cause flaky errors if a command is run twice very quickly
2023-09-23 20:02:05 -07:00
David Dworken
3253883198
Fix syncing consistency bug, but with the caveat that there is currently no easy/practical way to write tests for this
2023-09-23 19:57:41 -07:00
David Dworken
16f2751975
Add offline checking for deleting presaved entries so that hishtory works while offline
2023-09-23 19:32:35 -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
51ca2578b7
Follow up to e3d54e: Same thing for querying for pre-saved entries
2023-09-22 19:59:19 -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
3f0adbc324
Add support for deleting pre-saved entries on the remote server
2023-09-22 19:00: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
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
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
69047109ac
Skip presaving the presave command, since it is currently spamming the recorded history entries in bash
2023-09-19 13:35:11 -07:00
David Dworken
e6c76eb222
Make WHERE query for deleting presaved entries stricter and re-add in the error check that was removed in 713ee96a96
2023-09-17 14:38:48 -07:00
David Dworken
4c912cfaed
Improve sh config file tweak function to make it stricter with presaving
2023-09-17 14:35:56 -07:00
David Dworken
713ee96a96
Delete error checking branch that isn't necessary because the filter condition above is much more precise now
2023-09-17 12:06:19 -07:00
David Dworken
4b99e4d0e8
Fix misleading error message that contained the wrong shell name due to a copy/paste mistake
2023-09-14 23:09:15 -07:00
David Dworken
30ba0bd35c
Presaving clean up improvements: Skip presaving empty commands and make timestamp format clearer
2023-09-14 21:04:23 -07:00