Commit Graph

9612 Commits

Author SHA1 Message Date
Girish Ramakrishnan 69cd766f88 backups: run cron schedule per target 2025-07-25 08:36:09 +02:00
Girish Ramakrishnan 276db17f0c backups: use a real targetId 2025-07-25 08:12:27 +02:00
Girish Ramakrishnan ef5631bff4 backups: setPolicy is gone 2025-07-25 01:42:25 +02:00
Girish Ramakrishnan 62017b3ff5 backup: rename back backuplisting.js to backups.js
this was a transitional rename till I figured out how to split
it in backuptargets.js
2025-07-25 01:37:19 +02:00
Girish Ramakrishnan 3aafbd2ccb backups: add backup multiple targets 2025-07-25 01:30:27 +02:00
Girish Ramakrishnan 100bea981d constants: rename AUTOUPDATE_PATTERN_NEVER to CRON_PATTERN_NEVER 2025-07-24 21:47:46 +02:00
Girish Ramakrishnan 931311f11f rename backups to backuptargets 2025-07-24 18:54:10 +02:00
Girish Ramakrishnan 5e456f378b backups: split listing and targets 2025-07-24 18:21:48 +02:00
Girish Ramakrishnan bf315258c5 backups: add target foreign key to backups table
format is part of the backup target

in the future, if we want per-app format or schedule, we can add this
separately to the apps table itself. the full box backup can ignore
apps with a set backup target and use the latest backup (like an errored app).
the nice thing is restore will work correctly.
2025-07-24 17:32:16 +02:00
Girish Ramakrishnan 9780db6fa0 add backup targets table 2025-07-24 17:32:16 +02:00
Johannes Zellner 6d0a24cc95 Update postgres addon to support vectorchord 0.3.0 2025-07-24 16:45:08 +02:00
Girish Ramakrishnan 1a3d6e86a8 sudo: alway run in non-interactive 2025-07-24 14:42:31 +02:00
Johannes Zellner 68a8c964ea If we have app.error we always have an app.error.details object 2025-07-23 15:40:25 +02:00
Johannes Zellner 6c1045c545 error installationState is in the error details 2025-07-23 15:31:25 +02:00
Johannes Zellner 2386124089 Upcloud S3 does not return a Contents property if no keys are found 2025-07-22 18:55:44 +02:00
Johannes Zellner cc3dc1636b Ensure proxyauth has a fallback icon for apps without icons 2025-07-21 16:26:22 +02:00
Johannes Zellner 545ac689b1 Remove unused require 2025-07-21 16:22:20 +02:00
Girish Ramakrishnan e7799fef1c appstore: fail properly for non-200 when downloading icon 2025-07-21 12:11:26 +02:00
Girish Ramakrishnan d857ca46e0 test: add more system tests 2025-07-20 10:25:33 +02:00
Girish Ramakrishnan 0e3cc97ee6 system: use last mountpoint like before 2025-07-20 10:18:06 +02:00
Girish Ramakrishnan 66107cf7a4 system: make filesystem return value an array
Filesystem of df output is not unique
2025-07-20 10:06:01 +02:00
Girish Ramakrishnan 1e8df5c9d0 system: check if mountpoint is array 2025-07-19 13:06:50 +02:00
Girish Ramakrishnan 4f608bdc5f Fix tasks test 2025-07-18 20:55:54 +02:00
Girish Ramakrishnan 48559d3358 tasks: distinguish runtime crash vs task error in worker 2025-07-18 20:02:06 +02:00
Girish Ramakrishnan 5d8871a044 boxerror: remove usage of Object.assign 2025-07-18 19:33:34 +02:00
Girish Ramakrishnan a684fadf43 metrics: fix crash 2025-07-18 19:32:04 +02:00
Girish Ramakrishnan 7e0803c4b4 clean up task locks 2025-07-18 18:12:07 +02:00
Girish Ramakrishnan cb52dfdd0f backups.backupApp was used by the app update logic 2025-07-18 17:44:22 +02:00
Girish Ramakrishnan c10593e4ac tasks: remove the prefix for invokation lookup 2025-07-18 14:33:26 +02:00
Girish Ramakrishnan 0fa281083e apps: backup is not a state anymore
this is launched as a separate task
2025-07-18 14:14:54 +02:00
Girish Ramakrishnan 0aca6c2588 locks: rename lock types to make it clearer 2025-07-18 13:40:15 +02:00
Johannes Zellner e181abe797 Polish disk usage 2025-07-18 13:36:48 +02:00
Girish Ramakrishnan 7818219763 system: query docker size lazily 2025-07-18 13:05:33 +02:00
Girish Ramakrishnan 25d20266b8 diskusage: emit other entry 2025-07-18 13:02:53 +02:00
Girish Ramakrishnan 17ce6f7291 apptaskmanager: release lock and clear active task on task failure 2025-07-17 14:54:47 +02:00
Girish Ramakrishnan 7047ee9391 shell: add timeout logic and rework error handling
what's important:

* if task code ran, it exits with 0. this code is regardless of (error, result)
  * when it exited cleanly, we will get the values from the database

* if task timed out, the box code kills it and it has a flag tracking timedOut. we can
  ignore exit code in this case.

* if task code was stopped, box code will send SIGTERM which ideally it will handle and end with 70.

* if task code crashed and it caught the exception, it will return 50

* if task code crashed and node nuked us, it will exit with 1

* if task code was killed with some unhandleabe signal, taskworker.sh will return the signal (9=SIGKILL)
2025-07-17 12:44:24 +02:00
Girish Ramakrishnan 5e1c32b606 shell: rename signal to abortSignal
this prevents accidental typos with child_process signal handling
2025-07-17 09:50:43 +02:00
Girish Ramakrishnan 38032f0b77 remove the ignored debug 2025-07-17 09:47:26 +02:00
Girish Ramakrishnan 6364ea8e57 grammar 2025-07-17 08:30:51 +02:00
Girish Ramakrishnan c796e724aa shell/task: better logs 2025-07-17 02:04:50 +02:00
Girish Ramakrishnan 63053f46a8 shell: remove sudoCallback 2025-07-17 01:54:39 +02:00
Girish Ramakrishnan 8bf8c278f0 system: add tests for fs usage route 2025-07-17 01:42:28 +02:00
Girish Ramakrishnan aa0c186c8c logStream is not used anymore 2025-07-17 00:37:29 +02:00
Girish Ramakrishnan 5539f74bea system: add disk usage task 2025-07-17 00:09:50 +02:00
Johannes Zellner ce63dbde1b Check current subscription status once a day 2025-07-16 22:11:11 +02:00
Girish Ramakrishnan 989d843fcb shell: make shell.sudo promise based and waitable 2025-07-16 22:04:24 +02:00
Girish Ramakrishnan 32d07e7959 add spurious log 2025-07-16 21:37:30 +02:00
Girish Ramakrishnan 50b585c1dd shell: merge some options 2025-07-16 21:32:27 +02:00
Girish Ramakrishnan e03beba9bc sudo: add kill-child.sh
ultimately, a non-previlieged child cannot kill previlieged parent.
all the notes and research in shell.js are not useful.
2025-07-16 21:26:57 +02:00
Girish Ramakrishnan e4ceedcac6 logs: use child_process.spawn directly for sudo
shell.sudo will move to a promise based API shortly
2025-07-16 20:23:57 +02:00