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] #2929

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.

Copy link

sonarqubecloud bot commented Aug 2, 2024

Copy link
Contributor

github-actions bot commented Aug 2, 2024

Test Results

3 152 tests   - 1   3 047 ✔️  - 1   3m 31s ⏱️ -9s
   540 suites ±0      105 💤 ±0 
   540 files   ±0          0 ±0 

Results for commit 7e0be60. ± Comparison against base commit ee2e0bc.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

Datadog Report

Branch report: fix/app-registring-many-config-sync-jobs
Commit report: 2862698
Test service: kalium-jvm

✅ 0 Failed, 3047 Passed, 105 Skipped, 12.75s Total Time

@MohamadJaara MohamadJaara changed the title fix: app registring many config sync jobs fix: app registering many config sync jobs [WPB-10234] Aug 5, 2024
@MohamadJaara MohamadJaara marked this pull request as ready for review August 5, 2024 09:13
@MohamadJaara MohamadJaara requested review from a team, typfel, yamilmedina, alexandreferris, vitorhugods and saleniuk and removed request for a team August 5, 2024 09:28
@MohamadJaara MohamadJaara added this pull request to the merge queue Aug 13, 2024
Merged via the queue into release/candidate with commit 133b5e7 Aug 13, 2024
26 of 28 checks passed
@MohamadJaara MohamadJaara deleted the fix/app-registring-many-config-sync-jobs branch August 13, 2024 09:34
github-actions bot pushed a commit that referenced this pull request Aug 13, 2024
* fix: queue only one sync jobs

* fix tests

* detekt
@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
github-merge-queue bot pushed a commit that referenced this pull request Aug 23, 2024
* fix: queue only one sync jobs

* fix tests

* detekt

Co-authored-by: Mohamad Jaara <[email protected]>
Co-authored-by: Yamil Medina <[email protected]>
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. 🚨 Potential breaking changes 👕 size: M type: bug / fix 🐞
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants