Skip to content

Cherry-pick ACRA upgrade (downgraded to 5.0.2) and implement Limiter - #4953

Merged
timrae merged 4 commits into
ankidroid:hotfix-2.8.5from
mikehardy:hotfix-2.8.5
Oct 2, 2018
Merged

Cherry-pick ACRA upgrade (downgraded to 5.0.2) and implement Limiter#4953
timrae merged 4 commits into
ankidroid:hotfix-2.8.5from
mikehardy:hotfix-2.8.5

Conversation

@mikehardy

Copy link
Copy Markdown
Member

Pull Request template

Please, go through these checks before you submit a PR.

  • You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • Your code follows the style of the project (e.g. never omit braces in if statements)
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code

Purpose / Description

The ACRA report database is very difficult to get signal out of because of repeated exceptions as repeated exceptions clutter it up

Fixes

Fixes #4949 on API<15 devices for long term support

Approach

This limits the same exception to being sent once from each device per 7 day period (we could increase that if it is still too noisy)

How Has This Been Tested?

I pulled the hotfix-2.8.5 branch, cherry-picked the ACRA upgrade commit #4893 - downgraded that to 5.0.2 (last ACRA upgrade that worked for API<9, and we were API<10 in the 2.8 branch), then added the Limiter configuration

I booted that up in an API15 emulator and used the known crash bug of turning off all background processes and killing activities immediately while you edit card templates, and checked the debug database - got one report even though I did it a few times: https://918f7f55-f238-436c-b34f-c8b5f1331fe5-bluemix.cloudant.com/acralyzer/_design/acralyzer/index.html#/report-details/ankidroid/a8ba91f9-29e9-485e-8131-d1b4535c1ae8

I can also see the expected contents in /data/data/com.ichi2.anki/files/ACRA-limiter.json

The ACRA upgrade has worked well since implementation (also verified via production Acralyzer) so I'm comfortable with this even though it is core functionality. Should improve long-term support enough to maybe be worth it

Learning (optional, can help others)

I looked through the ACRA commits to find the last version that supported our versions in 2.8 and luckily it included all the ACRA forward-porting work I did except a couple tiny bits about text resources. It also included the Limiter.

@mikehardy

Copy link
Copy Markdown
Member Author

Oops! Didn't realize I already had a commit on this branch for LTS. Protecting that API was one of the MOST REPETITIVE BUGS though. Serious ACRA spamming since it's the widget. It's relatively non-controversial but I can rebase edit it out if you like of course

@ankidroid ankidroid deleted a comment Sep 13, 2018
@ankidroid ankidroid deleted a comment Sep 13, 2018
@mikehardy mikehardy added this to the v2.9 release milestone Sep 14, 2018
@ankidroid ankidroid deleted a comment Sep 14, 2018
@mikehardy

Copy link
Copy Markdown
Member Author

Once this has gone through a little time on the main branch to make sure it's good for an LTS-like branch, this should be good to go

@timrae timrae removed this from the v2.9 release milestone Sep 16, 2018
@mikehardy

Copy link
Copy Markdown
Member Author

I just went through ACRA and the error reporting on the alphas that have this is so much cleaner without all the repeats, this would be great for any attempt to support 2.8.x for API<15

@mikehardy

Copy link
Copy Markdown
Member Author

I just pushed one more change here that will hopefully work - the tools are old enough vs current now it's getting pretty hard to not break anything that gets touched, from a build/test/connectedCheck standpoint.

I did check, and we're locked into just one more month for release on 2.8.x (which means, supporting people down to API10) because play store won't allow app updates past November that don't target API26, and in order to compile for API26 you have to move to the API26 support libraries, which bumped minSdkVersion to API14. Not a big deal but I think it's still 10,000 to 20,000 people - a small football stadium

So this is it I think. Would be nice to get one more build out to get rid of ACRA spam and to fix that one crash bug then it'll probably just have to sit. It is different enough from where 2.9 is now I have trust issues, so if we could deploy this using the percent-by-percent style on play console I'd be more comfortable

@mikehardy
mikehardy requested a review from timrae September 30, 2018 22:06
@timrae
timrae merged commit 89d6c88 into ankidroid:hotfix-2.8.5 Oct 2, 2018
@mikehardy
mikehardy deleted the hotfix-2.8.5 branch October 3, 2018 11:59
@mikehardy
mikehardy restored the hotfix-2.8.5 branch October 3, 2018 12:26
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