Cherry-pick ACRA upgrade (downgraded to 5.0.2) and implement Limiter - #4953
Conversation
|
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 |
|
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 |
|
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 |
4f23fa1 to
6f81d1e
Compare
6f81d1e to
9e226a2
Compare
|
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 |
Pull Request template
Please, go through these checks before you submit a PR.
ifstatements)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.