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

fix: app registering many config sync jobs [WPB-10234] #3275

Merged

Conversation

MohamadJaara
Copy link
Member

@MohamadJaara MohamadJaara commented Aug 2, 2024

BugWPB-10234 [Android] app can register multiple SyncingAppConfig jobs at the same time


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  1. the config sync workers observe sync state and run every time the user is live
  2. the sync is being called every time onResume for the home screen
  3. each worker is running indefenatly

all of this is cauing multiple config sync jobs to run

Solutions

  1. change the workers to run once and not observe
  2. check if a sync job isalready running and do not run agian
  3. run once every 1h

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

…any-config-sync-jobs

# Conflicts:
#	app/src/main/kotlin/com/wire/android/di/accountScoped/UserModule.kt
#	kalium
…into fix/app-registring-many-config-sync-jobs

# Conflicts:
#	kalium
@MohamadJaara MohamadJaara marked this pull request as ready for review August 5, 2024 09:08
@MohamadJaara MohamadJaara requested review from a team, alexandreferris, borichellow, mchenani, Garzas and ohassine and removed request for a team August 5, 2024 09:08
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Aug 5, 2024
@MohamadJaara MohamadJaara changed the title fix: app registring many config sync jobs fix: app registring many config sync jobs [WPB-10234] Aug 5, 2024
@MohamadJaara MohamadJaara changed the title fix: app registring many config sync jobs [WPB-10234] fix: app registering many config sync jobs [WPB-10234] Aug 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Project coverage is 44.75%. Comparing base (d491d5b) to head (c4a0f25).
Report is 1 commits behind head on release/candidate.

Files Patch % Lines
...otlin/com/wire/android/ui/home/AppSyncViewModel.kt 73.91% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/candidate    #3275      +/-   ##
=====================================================
+ Coverage              44.67%   44.75%   +0.07%     
=====================================================
  Files                    456      456              
  Lines                  15361    15374      +13     
  Branches                2560     2565       +5     
=====================================================
+ Hits                    6862     6880      +18     
+ Misses                  7780     7772       -8     
- Partials                 719      722       +3     
Files Coverage Δ
...otlin/com/wire/android/ui/home/AppSyncViewModel.kt 75.00% <73.91%> (+75.00%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d491d5b...c4a0f25. Read the comment docs.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Built wire-android-staging-compat-pr-3275.apk is available for download

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Built wire-android-internal-compat-pr-3275.apk is available for download

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Built wire-android-staging-compat-pr-3275.apk is available for download

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Built wire-android-internal-compat-pr-3275.apk is available for download

…registring-many-config-sync-jobs

# Conflicts:
#	kalium
Copy link
Contributor

@MohamadJaara looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (release/candidate) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

release/candidate This PR
754444cea436edac3b19a2f4231465e910764ea0 dfb503975e54442802682365e33f6d303cef61df

Is this intentional?

Copy link

@MohamadJaara MohamadJaara enabled auto-merge August 13, 2024 09:35
@MohamadJaara MohamadJaara added this pull request to the merge queue Aug 13, 2024
Merged via the queue into release/candidate with commit 9b875dd Aug 13, 2024
12 of 13 checks passed
@MohamadJaara MohamadJaara deleted the fix/app-registring-many-config-sync-jobs branch August 13, 2024 10:04
Copy link
Contributor

Built wire-android-staging-compat-pr-3275.apk is available for download

Copy link
Contributor

Built wire-android-internal-compat-pr-3275.apk is available for download

@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Aug 13, 2024
MohamadJaara added a commit that referenced this pull request Aug 27, 2024
Co-authored-by: Mojtaba Chenani <[email protected]>

(cherry picked from commit 9b875dd)
github-merge-queue bot pushed a commit that referenced this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: unplanned Any work item that isn’t part of the product or technical roadmap. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants