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

using --error-reporting alone sends a useless report #423

Closed
sjourdan opened this issue Apr 12, 2021 · 7 comments
Closed

using --error-reporting alone sends a useless report #423

sjourdan opened this issue Apr 12, 2021 · 7 comments
Assignees
Labels
kind/bug Something isn't working priority/2
Milestone

Comments

@sjourdan
Copy link
Contributor

Description

Maybe there's no point in sending an empty sentry report when someone simply enables error reporting for testing

$ driftctl --error-reporting 
Detect, track and alert on infrastructure drift.

Usage: driftctl <command> [flags]

COMMANDS:
  completion               Generate completion script
  scan                     Scan
  version                  Display driftctl version

FLAGS:
      --error-reporting    Enable error reporting.
                           WARNING: may leak sensitive data
  -h, --help               Display help for command
      --no-version-check   Disable the version check

LEARN MORE:
  Use "driftctl <command> --help" for more information about a command
Sending error report ... done, thank you ❤️

Environment

  • OS: fedora 33
  • driftctl version: 0.7.0

How to reproduce

Possible Solution

Maybe do not send the report automatically if there´s nothing to send, or no command used

Additional context

@sjourdan sjourdan added the kind/bug Something isn't working label Apr 12, 2021
@eliecharra
Copy link
Contributor

@sjourdan Nothing is really sent if no crash happened.

We cannot know if something was captured by sentry, so maybe we can remove this message ?

@lotoussa lotoussa self-assigned this Apr 12, 2021
@lotoussa lotoussa modified the milestone: v0.7.1 Apr 12, 2021
@eliecharra eliecharra added this to the v0.8.0 milestone Apr 12, 2021
@lotoussa
Copy link
Contributor

Actually, with the v0.7.1 this flag behaviour is different.

@eliecharra
Copy link
Contributor

Actually, with the v0.7.1 this flag behaviour is different.

The flag name has changed but the behavior remain the same

@lotoussa
Copy link
Contributor

lotoussa commented Apr 12, 2021

Actually, with the v0.7.1 this flag behaviour is different.

The flag name has changed but the behavior remain the same

./bin/driftctl_darwin_amd64 --send-crash-report
Detect, track and alert on infrastructure drift.

Usage: driftctl <command> [flags]

COMMANDS:
  completion               Generate completion script
  scan                     Scan
  version                  Display driftctl version

FLAGS:
  -h, --help                Display help for command
      --no-version-check    Disable the version check
      --send-crash-report   Enable error reporting. Crash data will be sent to us via Sentry.
                            WARNING: may leak sensitive data (please read documentation for more details)
                            This flag should be used only if an error occur during execution

LEARN MORE:
  Use "driftctl <command> --help" for more information about a command

For example i'm talking about the message in your previous discussion with sjourdan
and this doesn't send anything to Sentry

@eliecharra
Copy link
Contributor

eliecharra commented Apr 12, 2021

For example i'm talking about the message in your previous discussion with sjourdan
and this doesn't send anything to Sentry

This is a bug that will be fixed with #424

@lotoussa lotoussa removed their assignment Apr 12, 2021
@sundowndev sundowndev self-assigned this Apr 20, 2021
@sundowndev
Copy link
Contributor

sundowndev commented Apr 20, 2021

@sjourdan Nothing is really sent if no crash happened.

We cannot know if something was captured by sentry, so maybe we can remove this message ?

@eliecharra May be we could replace this with a debug message ? I'll push a PR about that.

Example :

DEBU[0010] Closing providers
DEBU[0010] Closing provider key=aws
DEBU[0010] Closing gRPC client alias=us-east-1
DEBU[0010] Flushed Sentry events success=%!s(bool=true) timeout=1m0s
exit status 1

@sjourdan
Copy link
Contributor Author

sjourdan commented May 7, 2021

LGTM!

❯  LOG_LEVEL=error driftctl-0.8.0 --send-crash-report
Detect, track and alert on infrastructure drift.

Usage: driftctl <command> [flags]

COMMANDS:
  completion               Generate completion script
  gen-driftignore          Generate a .driftignore file based on your scan result
  scan                     Scan
  version                  Display driftctl version

FLAGS:
      --disable-telemetry   Disable telemetry
  -h, --help                Display help for command
      --no-version-check    Disable the version check
      --send-crash-report   Enable error reporting. Crash data will be sent to us via Sentry.
                            WARNING: may leak sensitive data (please read the documentation for more details)
                            This flag should be used only if an error occurs during execution

LEARN MORE:
  Use "driftctl <command> --help" for more information about a command


@sjourdan sjourdan closed this as completed May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/2
Projects
None yet
Development

No branches or pull requests

4 participants