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

Add SourceBindings built-in alias and fix filtering commands #967

Merged
merged 3 commits into from
Feb 3, 2023

Conversation

pkosiec
Copy link
Collaborator

@pkosiec pkosiec commented Feb 3, 2023

Description

Changes proposed in this pull request:

  • Add SourceBindings alias (sb)
  • Fix executing filtering for each command even if --filter is not passed
    • Filter reporting of filtered command
  • Don't report invalid feature for command without provided one

Screenshots

obraz

Testing

Checkout the PR and run Botkube locally with any config.
Edit noop_reporter.go and change ReportCommand

// ReportCommand reports a new executed command. The command should be anonymized before using this method.
func (n NoopReporter) ReportCommand(plat config.CommPlatformIntegration, cmd string, org command.Origin, filtered bool) error {
	// print all input params to make sure they are passed correctly
	log.Println("ReportCommand", plat, cmd, org, filtered)
	return nil
}

Run @Botkube edit and see sb alias available.
See that there's no log like:

time="2023-02-03T08:32:05Z" level=info msg="received unsupported resource: \"get\"" component=Executor

Run a few more commands with --filter and without. See if the reported command is filtered.

@pkosiec pkosiec added bug Something isn't working enhancement New feature or request labels Feb 3, 2023
@pkosiec pkosiec added this to the v0.18.0 milestone Feb 3, 2023
@pkosiec pkosiec changed the title Add SourceBindings built-in alias and fix minor reporter issues Add SourceBindings built-in alias and fix filtering commands Feb 3, 2023
@pkosiec pkosiec marked this pull request as ready for review February 3, 2023 10:04
@pkosiec pkosiec requested a review from a team February 3, 2023 10:04
@pkosiec pkosiec requested a review from PrasadG193 as a code owner February 3, 2023 10:04
@pkosiec pkosiec requested a review from mszostok February 3, 2023 10:04
@pkosiec pkosiec merged commit 387418b into kubeshop:main Feb 3, 2023
@pkosiec pkosiec deleted the fix-minor-issues branch February 3, 2023 10:59
mszostok added a commit that referenced this pull request Feb 3, 2023
* Update Prometheus message format (#966)

* Add SourceBindings built-in alias and fix filtering commands (#967)

* Use new format to download deps, remove deprecated DownloadDependencies method  (#968)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants