36 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
a6d65c821f feat: implement cron and one-off run task TTLs
Closes #7938
2025-11-18 16:46:31 -05:00
Jose Diaz-Gonzalez
1eb41f32dc feat: only redeploy formations that have had their values changed
Rather than redeploy every formation, only deploy formations that have had their values changed from the defaults.

This still doesn't handle the case where we touch existing processes when scaling _up_, but should decrease the number of services touched otherwise during scaling.

Also note that there are no tests for this new behavior yet (tests incoming).

Refs #7396
2025-06-23 04:42:09 -04:00
Jose Diaz-Gonzalez
e1af6ad1f9 fix: ensure all report subcommands exit 0 when there is no app
Closes #7454
2025-02-02 01:37:20 -05:00
Jose Diaz-Gonzalez
bb5ab0a777 refactor: use CallPlugnTrigger instead of PlugnTrigger
Refs #6422
2024-03-14 03:11:37 -04:00
Jose Diaz-Gonzalez
6cbe93c245 refactor: move all golang code for managing data directories to common plugin
Additionally, ensure the golang plugins handle setup/teardown of plugin and app-specific data directories during install, rename, and clone phases.
2023-01-08 23:36:12 -05:00
Jose Diaz-Gonzalez
6fed37b408 refactor: rename pre-restore trigger to scheduler-pre-restore
This better reflects what the trigger does, and allows us to use the pre-restore trigger at the beginning of the ps:restore command.
2022-11-29 01:38:36 -05:00
Jose Diaz-Gonzalez
bc26766b84 refactor: use exit code 137 to signify a lock was unable to be retrieved when calling ps:retire
Closes #5432
2022-11-27 20:23:13 -05:00
Jose Diaz-Gonzalez
ac58b502c5 refactor: move app listing back to common
Without this, we'd need to duplicate some logic or make it more complex via a plugin trigger.
2022-02-26 02:55:34 -05:00
Jose Diaz-Gonzalez
62a3eff5bb refactor: move apps listing from common plugin to apps plugin
This helps centralize app-related listing fetching.
2022-02-26 00:37:51 -05:00
Jose Diaz-Gonzalez
b48b79f5ca feat: allow specifying a single process type to restart
This changes restarts to drop the 'release' part that currently gets triggered, which also helps reduce the possibility that a new image layer will be added due to predeploy deploy triggers.

Note that the old method essentially halfway-rebuilt the app (which was what added the extra layer). This refactor removes that, which is a bc-break.

Additionally, scaling processes will result in deploying _only_ restarting the processes being scaled.

Closes #2184
2021-10-09 18:46:17 -04:00
Jose Diaz-Gonzalez
5103ee21aa chore: drop redundant if guard 2021-08-08 03:40:08 -04:00
Jose Diaz-Gonzalez
9e18736475 feat: add ability to scope retire call to a single app
Also cleanup the log output a bit for the ps:retire command.
2021-08-08 03:04:25 -04:00
Jose Diaz-Gonzalez
401683a305 refactor: write DOKKU_SCALE contents to scale property
- remove extraction of DOKKU_SCALE
- migrate to property system
- rewrite internals to use a FormationSlice instead of a map
2021-08-01 17:47:04 -04:00
Jose Diaz-Gonzalez
ef262c26e8 feat: override all existing scale parameters when calling ps-set-scale 2021-08-01 16:20:19 -04:00
Jose Diaz-Gonzalez
247698fea6 refactor: move can-scale check out to command
If the internals call ps-set-scale, we should always respect it.
2021-08-01 16:07:55 -04:00
Jose Diaz-Gonzalez
670e679a09 refactor: do not attempt to extract Procfile in ps:scale
The Procfile is now extracted in the pre-deploy step for every deploy and otherwise not removed. Thus, it should always exist when necessary - web will be scale to 1 automatically and it won't need to be present on future ps:scale calls since we'll have the scale file - and the command can execute faster.
2021-02-03 03:49:44 -05:00
Jose Diaz-Gonzalez
033b0952dd feat: allow formatting :report command output as json 2021-02-01 22:23:30 -05:00
Jose Diaz-Gonzalez
e1425a85e4 feat: add ability to set global properties
Not all properties can be set globally, and the "appName" in the global case is currently defaulted to `--global`. This is okay because domain label names cannot start with hyphens, and all app names must be valid domain label names.
2021-01-04 00:50:14 -05:00
Jose Diaz-Gonzalez
ffa303092f feat: add app name verification to all golang plugins
Moving verification of input to the earliest place is the best way to decrease the need to validate this further downstream.

Additionally, some of the existing checks were.... lacking :)
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
1439e8b30b hack: parse out the info flags for report subcommands separately
pflag doesn't ignore unspecified arguments, so they must be parsed out separately first.
2020-12-21 01:36:59 -05:00
Jose Diaz-Gonzalez
bf17023639 refactor: simplify ps:scale setup 2020-11-23 00:11:10 -05:00
Jose Diaz-Gonzalez
97513dee91 fix: handle case where deploying app image does not exist
This happens if ps:scale is called before a deploy.

Also refactor GetDeployingAppImageName() to return an error as the second return parameter.
2020-11-23 00:11:00 -05:00
Jose Diaz-Gonzalez
fceb412fb1 fix: reference extracted Procfile
Rather than attempting to always extract the Procfile, reference the one that was extracted by the last deploy. This fixes issues where 'docker container cp' may fail intermittently for lord knows what reason.

Closes #4083
2020-11-22 17:14:18 -05:00
Jose Diaz-Gonzalez
ae1b1c7274 chore: move function to internal 2020-11-21 21:07:20 -05:00
Jose Diaz-Gonzalez
53a76b1353 feat: implement ps:retire 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
5fd1772c3a chore: drop implemented function 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
ab0cc6c444 fix: implement ps:restore
Also add all the niceties around parallelism that were introduced for the other commands.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e6e5ede436 refactor: make parallel commands available to all of Dokku
There are other places in the codebase that currently act on all apps or could benefit from being able to do so. Being able to run `common.RunCommandAgainstAllApps()` and get that for free will be a boon to implementing this functionality elsewhere.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
28a36c4908 feat: add proper parallel support 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
f558008574 fix: correct a few stickler errors 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
bc9a60f696 feat: switch to updateScalefile from generateScalefile
The process is the same.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
23ad4bb230 refactor: add ability to skip deploys and fix process scaling 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
0a533c754f refactor: split ps:scale func into different functions 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
bf84405b43 fix: handle scaling properly when there is no procfile 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e8cfbfad36 fix: drop todos 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e7ee7a1781 refactor: implement most of ps plugin in golang 2020-11-21 20:57:33 -05:00