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

Send failed compilations pixel if needed #2014

Merged
merged 3 commits into from
Sep 25, 2023
Merged

Conversation

jaceklyp
Copy link
Contributor

@jaceklyp jaceklyp commented Sep 14, 2023

Task/Issue URL: https://app.asana.com/0/1203790657351911/1205404596674276/f

Description:
Introduce daily pixel containing information about failed content blocking rules compilations.

Steps to test this PR:

  1. Run the app and make sure the pixel is not being sent.
  2. Make compilation fail, by for instance adding some incorrect characters to temporary unprotected sites.
  3. Notice the counter increases for a given step of compilation.
  4. See that the pixel is being sent on the next app run and that statistics are being reset.

let store = FailedCompilationsStore()
if store.hasAnyFailures {
DailyPixel.fire(pixel: .compilationFailed, withAdditionalParameters: store.summary) { error in
if error == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: I'd use guard here :)

Copy link
Collaborator

@bwaresiak bwaresiak left a comment

Choose a reason for hiding this comment

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

LGTM!

@jaceklyp jaceklyp force-pushed the jacek/compilation-pixel branch from 4d0cef7 to ff4dd4c Compare September 25, 2023 14:25
@jaceklyp jaceklyp merged commit 9aeb889 into develop Sep 25, 2023
8 checks passed
@jaceklyp jaceklyp deleted the jacek/compilation-pixel branch September 25, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants