What's Changed
Breaking Changes 💥
Note
All those changes only affect SDK users who have their custom plugins written in Go.
-
The
pluginx.ExecuteCommand
function signature was changed.Old:
func ExecuteCommand(ctx context.Context, rawCmd string) (string, error)
New:
func ExecuteCommand(ctx context.Context, rawCmd string, mutators ...ExecuteCommandMutation) (ExecuteCommandOutput, error)
Reason
TheExecuteCommand
function signature has been changed to unify the command execution functions. The new signature allows for the passing of mutation functions to customize the execution and ensures future extensibility without breaking changes. Additionally, the introduction of theExecuteCommandOutput
type provides direct access to the stdout and stderr of the executed command. This is particularly useful when commands produce output on stderr, even if they have not failed. -
The
pluginx.ExecuteCommandWithEnvs
function has been deprecated. To achieve the same functionality, usepluginx.ExecuteCommand(ctx, "cmd", pluginx.ExecuteCommandEnvs(envs))
.
Implemented Enhancements 🎉
- Implement retries for Start Cloud Slack func by @mszostok in #1095
- Add CLI boilerplate and first implementation by @mszostok in #1105
- Streamline the help message by @pkosiec in #1118
- Add initial version for install and run binaries by @mszostok in #1112
- Add wrap message template for x plugin by @mszostok in #1117
- Introduce Botkube CLI with migration command by @josefkarasek in #1119
- Doctor plugin & Kubernetes plugin usage by @huseyinbabal in #1106
- Add CLI command to generate cobra docs by @mszostok in #1131
- Cli Brew Distribution by @huseyinbabal in #1135
- doctor plugin is added to plugin index build by @huseyinbabal in #1130
- Add tutorial message template for x plugin by @mszostok in #1127
- Improve Botkube CLI
login
,migrate
commands and fix E2E migration tests by @pkosiec in #1128 - Add option to install Botkube via CLI, add
--verbose
flag by @mszostok in #1134 - Add logs streaming for
botkube install
command by @mszostok in #1140 - Add botkube uninstall command by @mszostok in #1141
- Normalize and validate channel names and IDs by @pkosiec in #1142
- Add timestamp annotation on update by @mszostok in #1148
Fixed Bugs 🐛
- Fix ServiceAccount token path in Config Watcher by @huseyinbabal in #1096
- Make sure that
kubectl
uses a proper kubeconfig by @mszostok in #1098 - Add help note about multiple instances for Cloud Slack by @mszostok in #1099
- Fix resetting retries when reconnecting to Cloud Slack by @pkosiec in #1101
- Fix scheduling messages for Cloud Slack by @pkosiec in #1108
- Replace uuid with static value for Botkube SA by @mszostok in #1121
- Fix event update logic for Kubernetes source by @pkosiec in #1122
- Revert API changes for api.Message by @pkosiec in #1124
- Fix x plugin schema definition by @mszostok in #1129
- Remove duplicated ptr pkg by @mszostok in #1132
- Fix migration test flag by @pkosiec in #1138
- Update brew release by @mszostok in #1144
- Add build flags to CLI by @mszostok in #1146
- Plugins logger respect generic logger settings by @mszostok in #1147
- Remove custom install for brew formula, fix Helm plugin formatting by @mszostok in #1150
Other Changes ✨
- Bump google.golang.org/grpc from 1.51.0 to 1.53.0 by @dependabot in #1123
- Add Slack notifications for E2E tests by @pkosiec in #1136
- Rename x plugin to exec by @mszostok in #1137
- Rename
--auto-upgrade
to--auto-approve
flag for Migration CLI by @pkosiec in #1149
Full Changelog: v1.1.0...v1.2.0