Commit Graph

29 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
8282981361 feat: accept --global on :report subcommands
Every `:report` subcommand now recognizes `--global` as a scope selector that limits the report to globally-configured properties, including in JSON form via `--global --format json`. Previously this combination was rejected because `--global` was treated as an info flag, conflicting with `--format`. The shared `common.ParseReportArgs` helper now returns a `ReportArgs` struct exposing the parsed scope; each Go and bash report selects a global-only flag map when scope is global, and skips per-app verification.
2026-04-29 10:30:59 -04:00
Jose Diaz-Gonzalez
fe262a3a3c chore: remove extra trailing newline 2024-02-12 21:43:45 -05:00
Jose Diaz-Gonzalez
3c6cc68086 refactor: capture output by default
This is almost certainly the correct default for Dokku. While it's a BC break and might cause an increase in memory usage, the api is mostly internal and therefore this is safe to use.
2024-02-12 20:28:31 -05:00
Jose Diaz-Gonzalez
047a3c00f5 chore: remove default false values when calling CallExecCommand 2024-02-12 20:07:43 -05:00
Jose Diaz-Gonzalez
50239b056c fix: use new CallExecCommand when checking to see how help is being called
This is part of ongoing work to remove usage of the depreated NewShellCmd.
2024-02-12 00:55:16 -05:00
Jose Diaz-Gonzalez
aa05a95243 feat: allow setting the vector image as a global property 2024-01-25 04:26:57 -05:00
Jose Diaz-Gonzalez
47fb8e2093 fix: add missing triggers 2023-01-09 10:54:39 -05: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
László Görög
bc6130af4d fix: help flag 2022-02-14 11:04:09 +01:00
Jose Diaz-Gonzalez
fddf130abd fix: add missing clone/rename setup code for golang plugins 2021-10-09 23:49:46 -04:00
Jose Diaz-Gonzalez
d55e34a55f refactor: use LogFailWithError to allow a unified exit code for golang commands when the app is missing 2021-02-28 15:20:46 -05:00
Jose Diaz-Gonzalez
d09a7506df refactor: bubble up error handling so that standard exit codes can be set at the top-level
LogFail shouldn't be called internally if at all possible.
2021-02-28 15:20:46 -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
3d4205b206 fix: drop unused flag introduced by logs max-size feature 2021-01-23 18:29:11 -05:00
Jose Diaz-Gonzalez
815b839eeb feat: add trigger for fetching logs properties 2021-01-23 13:39:29 -05:00
Jose Diaz-Gonzalez
afe1e8b33c refactor: use log:set for logs and add global support 2021-01-23 12:45:05 -05:00
Jose Diaz-Gonzalez
eda71e3ffe feat: mirror log tailing support for logs:vector-logs command 2021-01-07 01:43:55 -05:00
Jose Diaz-Gonzalez
b186d9d66c docs: fix help output 2021-01-07 01:42:51 -05:00
Jose Diaz-Gonzalez
666bb9dfee fix: unscope err for report subcommands 2021-01-07 01:12:50 -05:00
Jose Diaz-Gonzalez
43d6a2ad94 feat: add ability to set a global vector sink 2021-01-04 01:11:49 -05:00
Jose Diaz-Gonzalez
fd85b1f605 feat: add vector integration
This currently is missing a few features:

- global sinks
- logrotation

But works fairly well otherwise.
2021-01-04 00:30:22 -05:00
Jose Diaz-Gonzalez
4d0979bbcd fix: properly parse flags for logs command
Closes #4256
2020-12-21 16:50:34 -05:00
Jose Diaz-Gonzalez
8240790381 fix: correct argument handling when setting the --app flag
When setting the `--app` flag, there was a special case for the config plugin. This plugin used to take the `--no-restart` flag as the first argument - and still did until this change - resulting in an invalid call to the plugin subcommands. What is worse is that this functionality carried over to all other plugins as they were rewritten in golang, and thus the issue spread without us knowing.

The fix is to support GNU flag parsing rules, which Golang does not do by default (Because Of Reasons™). Switching to `github.com/spf13/pflag` fixes this issue, and also allows positional arguments to be placed wherever, even in the middle of flags.

Closes #4255
2020-12-20 22:06:33 -05:00
Jose Diaz-Gonzalez
7cdc68a007 refactor: use framework for running function against all apps 2020-11-22 15:01:36 -05:00
Jose Diaz-Gonzalez
1d93246af8 chore: formatting 2020-11-22 15:01:36 -05:00
Jose Diaz-Gonzalez
abce952d0f fix: correct help output 2020-11-22 15:01:36 -05:00
Jose Diaz-Gonzalez
0b30bc8034 chore: formatting 2020-11-22 15:01:36 -05:00
Jose Diaz-Gonzalez
9882c94eec fix: add missing help output 2020-11-22 15:01:36 -05:00
László Görög
9a02f3f1dc refactor: transition logs plugin to go 2020-11-22 15:01:36 -05:00