Commit Graph

21 Commits

Author SHA1 Message Date
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
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
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
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
30ba0bd35c
Presaving clean up improvements: Skip presaving empty commands and make timestamp format clearer 2023-09-14 21:04:23 -07:00
David Dworken
57c5a69f7d
Fix bug where we failed to delete pre-saved history entries due to race conditions causing the DB to be locked 2023-09-12 18:55:13 -07:00
David Dworken
c311b09844
Improve error messages when we fail to delete pre-saved history entries 2023-09-12 15:53:52 -07:00
David Dworken
2ccbb8d587
Store timestamps in DB in Unix time, and display them in the Local time for consistent TZs in displays, and to ensure ordering is correct
This fixes a bug where entries could be out of order if they were recorded on machines in different TZs (e.g. if one machine had the TZ set to UTC). Admittedly, this commit isn't a perfect fix since
it doesn't change all the existing hishtory entries to be stored in UTC, but this just means that the ordering bug will continue to exist for historical entries, but be fixed for new entries. And
for our purposes, that is good enough. :)

 # Please enter the commit message for your changes. Lines starting
2023-09-09 12:28:01 -07:00
David Dworken
c5bdee9ad5
Merge pull request #102 from lsmoura/sergio/no-ctx-ptr
Remove context pointers since there is no need to pass around a pointer to an interface
2023-09-06 19:58:08 -07:00
Sergio Moura
a12b0e5f6f no context pointers 2023-09-05 15:45:17 -04:00
Sergio Moura
83ad8c7b1f wrap errors with %w instead of using %v 2023-09-05 15:08:55 -04:00
David Dworken
5e44159a0b
Remove extraneous fmt.Println from beta-mode feature for pre-saving history entries 2023-08-27 22:11:22 -07:00
David Dworken
2490082088
no-op refactoring: Move history entry building code from lib.go to cmd file for saving history entries 2023-08-27 22:05:24 -07:00
David Dworken
25ec191f1a
Implement pre-saving feature to ensure that long-running/non-terminating commands are saved in hishtory 2023-08-27 14:24:59 -07:00
David Dworken
35444bf56e
Swap ioutil to non-deprecated alternatives + clean up pre-commit errors 2022-11-27 11:59:06 -08:00
David Dworken
be2cde72c2
Appears to be a functional migration to cobra 2022-11-16 08:03:23 -08:00
David Dworken
27bbe97cb2
Better organize the cobra generated help page 2022-11-16 08:03:23 -08:00
David Dworken
ecdd22dcdd
Everything migrated to cobra, but with some very significant TODOs 2022-11-16 08:03:23 -08:00