Commit Graph

59 Commits

Author SHA1 Message Date
Jörg Thalheim
f6899166c7 cmd: don't shadow time module 2025-05-04 10:39:50 +02:00
Jörg Thalheim
03731a2a67 run_local: allow stdin to be a file descriptor 2025-05-04 10:39:28 +02:00
Qubasa
973f8f0489 clan-app: working file dialogue 2025-01-06 20:14:24 +01:00
Johannes Kirschbauer
88bade7c14 CLI: include command stderr on failures 2025-01-03 16:32:16 +01:00
Johannes Kirschbauer
7b930ab440 CLI: init cmd_with_root 2024-12-30 15:47:21 +01:00
Qubasa
3cc7511764 clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C 2024-12-09 18:07:23 +01:00
Qubasa
771b178516 clan-cli: made run_no_stdout runOpts compatible and make time table thread safe 2024-12-06 12:18:28 +01:00
Jörg Thalheim
ee88e70a9f no longer show prefix 2024-12-04 12:14:32 +01:00
Jörg Thalheim
51526aedbb rename run_no_output to run_no_stdout
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
Qubasa
164c621dc0 clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts 2024-12-03 16:01:51 +01:00
Qubasa
d2719f3179 clan-cli: cmd.run now has its options extracted to a dataclass 2024-11-28 15:26:37 +01:00
Qubasa
55e080a89f clan-cli: Add -L option to nixos-rebuild switch to still have build output, simplify logging code 2024-11-28 10:42:43 +01:00
Qubasa
fddaa3a5bb clan-cli: Refactor colors to a subset of colors that work in light and dark mode 2024-11-27 12:42:10 +01:00
Qubasa
8866a85765 clan-cli: Refactor ssh part 2, Refactor custom_logger 2024-11-22 22:08:50 +01:00
Qubasa
250eed0798 clan-cli: upload.py -> Replace rsync with native ssh command 2024-11-15 22:03:47 +07:00
a-kenji
a1508ab9cb pkgs/cli: Fix typo in comment 2024-11-14 10:17:44 +01:00
Jörg Thalheim
cb6fefd694 cmd: also process stdin 2024-11-13 13:23:42 +01:00
Qubasa
2df1179666 clan-cli: Improved --debug output by indenting commands, add TRACE_DEPTH environment variable 2024-11-11 21:23:53 +07:00
Jörg Thalheim
aba5ae93ad fix resource leak in case need_user_terminal is used 2024-10-29 13:54:12 +01:00
DavHau
db0fdba384 cli: set needs_user_terminal for all ssh commands 2024-10-23 19:40:50 +07:00
DavHau
28026a9b92 cmd.run: add needs_user_terminal to unbreak sudo 2024-10-23 17:37:54 +07:00
Jörg Thalheim
6140c53de0 use actual performance timer to measure how long a process takes 2024-10-10 17:59:56 +02:00
Jörg Thalheim
71e7ecd49c improve terminating processes on error 2024-10-10 17:59:26 +02:00
Jörg Thalheim
1c9ea1d5b8 cmd/run: remove unnecessary wait 2024-10-08 17:51:55 +00:00
Qubasa
0f79c6a850 clan-cli: Improve CmdOut output 2024-10-07 01:36:40 +02:00
Jörg Thalheim
46c0b7cb2e don't leak memory in global table unless we want to record performance 2024-10-01 19:32:00 +02:00
Jörg Thalheim
d5d6774124 fix file descriptor leak in cmd.run()
we were leaking pipes.
2024-10-01 19:27:47 +02:00
Jörg Thalheim
ad3daa3ce4 add RET, Q, RSE lint 2024-09-02 15:58:49 +02:00
Jörg Thalheim
15ff74f7c2 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
Jörg Thalheim
35839ef701 enable bug-bear linting rules 2024-09-02 13:26:07 +02:00
lassulus
578162425d Revert "clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py."
This reverts commit ba86b49952.
2024-06-03 12:25:20 +02:00
Qubasa
ba86b49952 clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py. 2024-06-02 16:52:31 +02:00
Qubasa
d513f66170 clan-cli: Refactor machines/update.py to cmd.run 2024-06-02 10:00:23 +02:00
Qubasa
1a39957dbb clan-cli: Refactor subprocess.run to cmd.run. tea-create-pr: Fix missing fail-on-change for treefmt 2024-06-02 09:53:24 +02:00
a-kenji
eee99730d1 clan: add run_no_stdout function suppressing stdout
Add the `run_no_stdout` function suppressing stdout by default.This
keeps the noise down on most commands, while still
stayingdebuggable.Stdout will be active when the `--debug` flag is
passed to the cli.

Fixes #1443
2024-05-28 11:13:55 +02:00
Qubasa
e4896814f2 clan_cli: Add TimeTable class to cmd.py. Fix bugs in Machine rewrite 2024-03-08 22:01:54 +07:00
Qubasa
a6f652bdfc clan_cli,clan_vm_manager: Moved profiler to clan_cli. Add cmd timer to see how long run commands take 2024-03-06 17:12:20 +07:00
Jörg Thalheim
9fef40258a cmd: skip print for zero-length bufs 2024-01-30 10:30:25 +07:00
Jörg Thalheim
796ef76893 cmd: add a timeout in select 2024-01-12 00:20:22 +01:00
Qubasa
05aaa180e0 cmd.py: Fix busy loop. 2024-01-12 00:13:21 +01:00
Qubasa
1d489438bd Re-added rlist.remove to counter busy loop 2024-01-12 00:08:15 +01:00
Qubasa
0941367bb3 cmd.py: Fix deadlock because of incorrect select usage 2024-01-11 23:03:14 +01:00
Qubasa
3351f87a7f Removed duplicate logging messages 2024-01-11 22:46:29 +01:00
Qubasa
d1ca0eaf80 Identified deadlocking funciton 2024-01-11 22:28:35 +01:00
Qubasa
f7c6ab5888 Working test_secrets_generate 2024-01-11 21:48:39 +01:00
Qubasa
16b043f508 cmd.py: Fixing bug: missing output because of forgotten flush() call 2024-01-11 21:11:49 +01:00
Qubasa
2ae439ec52 cmd.py refactor part 4 2024-01-11 21:11:49 +01:00
Qubasa
64846eb395 Fixed bug, where exception is raised where there shouldn't be raised one 2024-01-10 18:46:54 +01:00
Qubasa
699515ca89 Added ClanCmdError. cmd.run now returns this error 2024-01-10 17:58:39 +01:00
Qubasa
626e5558f3 Fix cmd to default print on all outputs. Default print on stderr 2024-01-10 17:31:11 +01:00