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
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
216803f325
Bring back logic that was removed in c9da7a10e4
that made it so invalid initial search queries will get replaced with a query for the empty string
2023-09-18 22:21:10 -07:00
David Dworken
c9da7a10e4
Make the initial search query for the TUI async so that the UI opens immediately, so that user's can start typing their query without any delay
2023-09-18 19:35:53 -07:00
David Dworken
4f592f4aef
Automatically retry search queries when the DB is locked to increase reliability (especially when the backend is down, which leads to more queries, and thus more instances of the DB being locked)
2023-09-18 19:22:26 -07:00
David Dworken
f589a0b1ba
Increment the test_retry_count metric for failures too to ensure that it captures tests that fail all retries
2023-09-17 23:07:10 -07:00
David Dworken
f64362fbba
Fix metrics tag format so handler tags are properly exported to datadog
2023-09-17 22:46:31 -07:00
David Dworken
3baef9aeff
Update docker compose test to simplify it and make it more reliable
2023-09-17 21:25:37 -07:00
David Dworken
3c5092161a
Release v0.217
2023-09-17 21:17:29 -07:00
David Dworken
134061085b
Fix bug in searching logic that caused gorm to template in NULL for non-null values
2023-09-17 20:24:48 -07:00
David Dworken
8e7dc41ed7
Release v0.216
2023-09-17 15:21:10 -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
1d7ba41289
Avoid performance hit caused by pre-saving by presaving in the background
2023-09-17 14:11:44 -07:00
David Dworken
1ab61f1d7d
Fix missing err != nil branch
2023-09-17 13:07:38 -07:00
David Dworken
d94e1bfa22
Fix imports after moving backend/server code in 772aaf2453
2023-09-17 12:53:55 -07:00
David Dworken
772aaf2453
Move internal/ directory into backend/server since it is all server-specific internals
2023-09-17 12:51:21 -07:00
David Dworken
7421a937d1
Disable usage data tracking for server unit tests since they don't properly set up all the tables
2023-09-17 12:41:49 -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
04a0fc40cd
Make errors from updateUsageData(...) crash when running in non-prod to ensure they're detected/handled before deployment
2023-09-17 12:03:42 -07:00
David Dworken
60406916e9
Revert "Upgrade gorm dependency"
...
This reverts commit 29108dd15f
.
2023-09-15 17:51:20 -07:00
David Dworken
b733878878
Skip re-initializing tables when running in prod to make server startup faster
2023-09-15 17:51:14 -07:00
David Dworken
29108dd15f
Upgrade gorm dependency
2023-09-15 17:30:46 -07:00
David Dworken
6e33e1ee1d
Swap healthcheck endpoint to count the approximate number of history entries
2023-09-15 17:21:16 -07:00
David Dworken
63741a0d14
Optimize docker build efficiency by running apk add early so that it is cached
2023-09-15 17:10:55 -07:00
David Dworken
ce511b28a3
More debug prints for auto-migration
2023-09-15 17:08:33 -07:00
David Dworken
1036e14c17
Add debug prints to debug server startup
2023-09-15 17:07:25 -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
48e33d5034
Make the query input box in the TUI match the terminal dimensions
2023-09-14 21:14:16 -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
David Dworken
328c35a096
Add presaving support for fish
2023-09-14 21:03:36 -07:00
David Dworken
c5a7245991
Add bug fix for presaving history where entries would sometimes end up duplicated
2023-09-14 21:01:13 -07:00
David Dworken
9fcdb7f960
Add TODO for tui UX improvement
2023-09-14 20:40:35 -07:00
David Dworken
8ee48ec7d9
Release v0.215
2023-09-14 12:39:13 -07:00