opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://opensrp.io
Apache License 2.0
58 stars 59 forks source link

Main | Performance improvements #3586

Closed dubdabasoduba closed 1 week ago

dubdabasoduba commented 3 weeks ago

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes [link to issue]

Engineer Checklist

Code Reviewer Checklist

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 17.18750% with 53 lines in your changes missing coverage. Please review.

Project coverage is 27.3%. Comparing base (9676866) to head (f821c70). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...e/quest/ui/questionnaire/QuestionnaireViewModel.kt 16.3% 51 Missing :warning:
...er/fhircore/engine/data/local/DefaultRepository.kt 0.0% 1 Missing :warning:
...re/engine/data/remote/shared/TokenAuthenticator.kt 50.0% 0 Missing and 1 partial :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensrp/fhircore/pull/3586/graphs/tree.svg?width=650&height=150&src=pr&token=IJUTHZUGGH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp)](https://app.codecov.io/gh/opensrp/fhircore/pull/3586?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) ```diff @@ Coverage Diff @@ ## main #3586 +/- ## ========================================= - Coverage 27.4% 27.3% -0.1% - Complexity 785 786 +1 ========================================= Files 282 282 Lines 14683 14697 +14 Branches 2634 2635 +1 ========================================= - Hits 4024 4022 -2 - Misses 10114 10129 +15 - Partials 545 546 +1 ``` | [Flag](https://app.codecov.io/gh/opensrp/fhircore/pull/3586/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | Coverage Δ | | |---|---|---| | [engine](https://app.codecov.io/gh/opensrp/fhircore/pull/3586/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `63.8% <33.3%> (-0.1%)` | :arrow_down: | | [geowidget](https://app.codecov.io/gh/opensrp/fhircore/pull/3586/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `16.0% <ø> (ø)` | | | [quest](https://app.codecov.io/gh/opensrp/fhircore/pull/3586/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `5.9% <16.3%> (-0.1%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/opensrp/fhircore/pull/3586?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | Coverage Δ | | |---|---|---| | [...hircore/quest/ui/appsetting/AppSettingViewModel.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3586?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fui%2Fappsetting%2FAppSettingViewModel.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L3VpL2FwcHNldHRpbmcvQXBwU2V0dGluZ1ZpZXdNb2RlbC5rdA==) | `2.2% <ø> (ø)` | | | [...er/fhircore/engine/data/local/DefaultRepository.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3586?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fdata%2Flocal%2FDefaultRepository.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvZGF0YS9sb2NhbC9EZWZhdWx0UmVwb3NpdG9yeS5rdA==) | `58.6% <0.0%> (-0.1%)` | :arrow_down: | | [...re/engine/data/remote/shared/TokenAuthenticator.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3586?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fdata%2Fremote%2Fshared%2FTokenAuthenticator.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvZGF0YS9yZW1vdGUvc2hhcmVkL1Rva2VuQXV0aGVudGljYXRvci5rdA==) | `74.4% <50.0%> (-0.6%)` | :arrow_down: | | [...e/quest/ui/questionnaire/QuestionnaireViewModel.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3586?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fui%2Fquestionnaire%2FQuestionnaireViewModel.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L3VpL3F1ZXN0aW9ubmFpcmUvUXVlc3Rpb25uYWlyZVZpZXdNb2RlbC5rdA==) | `5.4% <16.3%> (-0.5%)` | :arrow_down: |

🚨 Try these New Features:

pld commented 2 weeks ago

This looks like the main error The automatic loading of test framework implementation dependencies has been deprecated. This is scheduled to be removed in Gradle 9.0. Declare the desired test framework directly on the test suite or explicitly declare the test framework implementation dependencies on the test's runtime classpath. Consult the upgrading guide for further information: https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#test_framework_implementation_dependencies

LZRS commented 2 weeks ago

This looks like the main error The automatic loading of test framework implementation dependencies has been deprecated. This is scheduled to be removed in Gradle 9.0. Declare the desired test framework directly on the test suite or explicitly declare the test framework implementation dependencies on the test's runtime classpath. Consult the upgrading guide for further information: https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#test_framework_implementation_dependencies

Moving this to be tracked in a separate issue

pld commented 1 week ago

@ndegwamartin something's causing the quest build to hang/fail but it seems like it runs ok locally, wonder if there's some cache cleanup that needs to happen in the tests?

ndegwamartin commented 1 week ago

@ndegwamartin something's causing the quest build to hang/fail but it seems like it runs ok locally, wonder if there's some cache cleanup that needs to happen in the tests?

Yeah that's strange, will look into it