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: message status not updated while using the fire and forget asset mechanism (WPB-4519) #2061

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

yamilmedina
Copy link
Contributor

@yamilmedina yamilmedina commented Sep 14, 2023


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

While using ScheduleNewAssetMessageUseCase to upload assets and the backend has the federator down (technically online but not reachable to/from by other backends) the asset is uploaded but sending the message fails not reflecting this state in the database.

Causes (Optional)

No button to retry is visible, and the asset message shows as pending.

Solutions

Update the status of the message when we can't send the message with our MessageSendFailureHandler component, so can be correctly updated to FAILED accordingly.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2023

Unit Test Results

       6 files         6 suites   9m 0s ⏱️
2 244 tests 2 226 ✔️ 18 💤 0

Results for commit 9c0d2b9.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release/candidate@b4ef473). Click here to learn what that means.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##             release/candidate    #2061   +/-   ##
====================================================
  Coverage                     ?   58.04%           
  Complexity                   ?       24           
====================================================
  Files                        ?     1004           
  Lines                        ?    37580           
  Branches                     ?     3431           
====================================================
  Hits                         ?    21813           
  Misses                       ?    14295           
  Partials                     ?     1472           

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 b4ef473...9c0d2b9. Read the comment docs.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Sep 14, 2023

Datadog Report

All test runs b512a5d 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 2128 120 10m 49s Link
kalium-jvm 0 0 0 2245 98 12m 16s Link

@yamilmedina yamilmedina requested review from Garzas, gongracr, a team, alexandreferris, MohamadJaara and mchenani and removed request for a team September 14, 2023 12:46
Copy link
Contributor

@gongracr gongracr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! 🪱 🐦 👏 But I still can't think why we never even considered this buggy scenario for non-federated scenarios.

@yamilmedina yamilmedina enabled auto-merge (squash) September 14, 2023 13:43
@yamilmedina yamilmedina merged commit c22d0e0 into release/candidate Sep 14, 2023
12 checks passed
@yamilmedina yamilmedina deleted the fix/assets-remote-fail-noerror branch September 14, 2023 15:37
github-actions bot pushed a commit that referenced this pull request Sep 14, 2023
… mechanism (WPB-4519) (#2061)

* fix: add failure handling while remote be is offline for assests scheduler mechanism

* fix: coverage

* fix: coverage

* fix: coverage
github-merge-queue bot pushed a commit that referenced this pull request Sep 15, 2023
… mechanism (WPB-4519) (#2064)

* fix: message status not updated while using the fire and forget asset mechanism (WPB-4519) (#2061)

* fix: add failure handling while remote be is offline for assests scheduler mechanism

* fix: coverage

* fix: coverage

* fix: coverage

* Empty-Commit

---------

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants