Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass the --filter flag to the Botkube executor plugins #906

Open
mszostok opened this issue Dec 22, 2022 · 0 comments
Open

Pass the --filter flag to the Botkube executor plugins #906

mszostok opened this issue Dec 22, 2022 · 0 comments
Labels
enhancement New feature or request needs-triage Relates to issues that should be refined

Comments

@mszostok
Copy link
Collaborator

Overview

The --filter flag is globally reserved by Botkube. That means that all other plugins cannot use it.

However, Helm has its own support for the --filter flag in helm list --filter 'ara[a-z]+'. It's more advanced as:

  • table headers are not removed from the output,
  • regex is fully supported,
  • and also only the release names are compared (not the whole line).

As a workaround, in the helm list command we use -f instead of --filter. However, this breaks the helm list contract and user needs to adjust the command before running it via Botkube which provides a bad UX.

Acceptance Criteria

  • The --filter flag, if specified, is passed to the Botkube executor plugins

Options

  • switch to pipes instead of flag. For example, kc get po -A | grep 'k.*'. We can implement the grep plugin and do command split on | and support command chaining.
  • use different syntax for filter flag, e.g. @filter instead of --filter
  • Extend the ExecutorOutput struct and add isResultFiltered, if yes, then we don't run our own filtering.

Notes

We should think about general approach to the Botkube related flags, to make sure that we will not have similar problem in the future.

@mszostok mszostok added enhancement New feature or request needs-triage Relates to issues that should be refined labels Dec 22, 2022
@mszostok mszostok added this to the v0.18.0 milestone Dec 22, 2022
@mszostok mszostok added this to Botkube Dec 22, 2022
@pkosiec pkosiec removed this from the v0.18.0 milestone Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage Relates to issues that should be refined
Projects
Status: No status
Development

No branches or pull requests

2 participants