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

Skip Bugsnag initialisation if user disabled gcloud analytics #678

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

pawelpasterz
Copy link
Contributor

Fixes #581

Changes

  • Introduce BugsnagInitHelper class to handle Bugsnag initialisation logic
  • if useMock is equal true -- Bugsnag is not enabled
  • if user had disabled gcloud analytics -- Bugsnag is not enabled
  • in other cases -- Bugsnag enabled
  • Add updateFlank gradle task to update local flank jar
  • Add mockk library as POC (will replace mockito in the future)

Checklist

  • Documented
  • Unit tested
  • release_notes.md updated


private const val GSUTIL_FOLDER = ".gsutil"
private const val ANALYTICS_FILE = "analytics-uuid"
private const val DISABLED = "DISABLED\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is there a new line at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file can be added manually by the user. Since some of text editors add new line char at the end of text file automatically I wanted to simulate that case.

@doodla
Copy link
Contributor

doodla commented Mar 22, 2020 via email

@pawelpasterz pawelpasterz merged commit 3a27b3b into master Mar 23, 2020
@pawelpasterz pawelpasterz deleted the respect-gcloud-analytics-opt-out branch March 23, 2020 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect gcloud analytics opt-out
4 participants