Skip to content

feat: implement SyncServicesUseCase to sync services from backend and update ObserveAllServicesUseCase to avoid network calls#4070

Open
MohamadJaara wants to merge 1 commit into
developfrom
mo/don't-wait-for-remote-api-to-show-the-list-of-bots
Open

feat: implement SyncServicesUseCase to sync services from backend and update ObserveAllServicesUseCase to avoid network calls#4070
MohamadJaara wants to merge 1 commit into
developfrom
mo/don't-wait-for-remote-api-to-show-the-list-of-bots

Conversation

@MohamadJaara
Copy link
Copy Markdown
Member


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

ObserveAllServicesUseCase only return after a remote API update even tho the list of bots is

Causes (Optional)

the use case will update first and then return

Solutions

split it into ObserveAllServicesUseCase and SyncServicesUseCase and call SyncServicesUseCase from the view model when needed to update

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.

… update ObserveAllServicesUseCase to avoid network calls
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Test Results

0 tests   - 4 826   0 ✅  - 4 709   0s ⏱️ - 2m 59s
0 suites  -   792   0 💤  -   117 
0 files    -   792   0 ❌ ±    0 

Results for commit 8f22a65. ± Comparison against base commit 2a3f780.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link
Copy Markdown

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1 Test failed

kaliumLogicModuleShouldNotExposeEitherTypesInPublicAPI[jvm] from com.wire.kalium.logic.architecture.UseCaseRulesTest   View in Datadog   (Fix with Cursor)
java.lang.AssertionError: Either types should not be exposed in public API of :kalium:logic module. Found 1 violation(s):
  - Public interface 'SyncServicesUseCase' in SyncServicesUseCase has function 'invoke' returning Either: Either<CoreFailure, Unit>

java.lang.AssertionError: Either types should not be exposed in public API of :kalium:logic module. Found 1 violation(s):
  - Public interface 'SyncServicesUseCase' in SyncServicesUseCase has function 'invoke' returning Either: Either<CoreFailure, Unit>

	at com.wire.kalium.logic.architecture.UseCaseRulesTest.kaliumLogicModuleShouldNotExposeEitherTypesInPublicAPI(UseCaseRulesTest.kt:165)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8f22a65 | Docs | Give us feedback!

@MohamadJaara MohamadJaara requested a review from saleniuk May 6, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants