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

Include full plugin name in reported command #1295

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

pkosiec
Copy link
Collaborator

@pkosiec pkosiec commented Oct 11, 2023

Description

Changes proposed in this pull request:

  • Include full plugin name in reported command
  • Report communication group anonymous ID
  • Report Cloud Slack enabled

Testing

No need, unit tests properly test it.

But, you can change the NoopReporter to:

func (n NoopReporter) ReportBotEnabled(p config.CommPlatformIntegration, i int) error {
	fmt.Println(">>", p, i)
	return nil
}

// ReportSinkEnabled reports an enabled sink.
func (n NoopReporter) ReportSinkEnabled(p config.CommPlatformIntegration, i int) error {
	fmt.Println(">>", p, i)
	return nil
}

// ReportCommand reports a new executed command. The command should be anonymized before using this method.
func (n NoopReporter) ReportCommand(in ReportCommandInput) error {
	formatx.StructDumper().Dump("ReportCommandInput", in)
	return nil
}

And execute a few commands:

image

image

image

@pkosiec pkosiec added the enhancement New feature or request label Oct 11, 2023
@pkosiec pkosiec added this to the v1.6.0 milestone Oct 11, 2023
@pkosiec pkosiec marked this pull request as ready for review October 11, 2023 08:31
@pkosiec pkosiec requested a review from PrasadG193 as a code owner October 11, 2023 08:31
@pkosiec pkosiec requested review from a team and mszostok October 11, 2023 08:31
Copy link
Collaborator

@mszostok mszostok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 if you will have some time IMO with 5 params it would be already beneficial to use struct as input, but it's just nice to have, we can do it later.

@pkosiec pkosiec force-pushed the include-plugin-name branch from aa2c0cd to 0618dd5 Compare October 12, 2023 11:05
internal/analytics/reporter.go Outdated Show resolved Hide resolved
cmd/botkube-agent/main.go Outdated Show resolved Hide resolved
@pkosiec pkosiec force-pushed the include-plugin-name branch from 0618dd5 to 0ebdabb Compare October 12, 2023 15:03
internal/analytics/reporter.go Outdated Show resolved Hide resolved
pkg/bot/slack_cloud.go Outdated Show resolved Hide resolved
pkg/bot/slack_cloud.go Outdated Show resolved Hide resolved
@pkosiec pkosiec enabled auto-merge (squash) October 13, 2023 08:10
@pkosiec pkosiec merged commit a16055c into kubeshop:main Oct 13, 2023
15 checks passed
@pkosiec pkosiec deleted the include-plugin-name branch October 13, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants