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: Asset message resend transfer status #WPB-11035 #3063

Open
wants to merge 1 commit into
base: release/candidate
Choose a base branch
from

Conversation

m-zagorski
Copy link

@m-zagorski m-zagorski commented Oct 16, 2024

BugWPB-11035 [Android] No error displayed when sending imaged or gifs without internet being availble

https://wearezeta.atlassian.net/browse/WPB-11035

What's new in this PR?

Issues

When we resended asset message, we're not updating its status to uploaded hence the message was stuck with Uploading indicator forever

Solutions

Change the status to Uploaded before trying to again send the message

Testing

How to Test

  • Send any asset message while not having connection, turn on connection again, tap resend, message arrive on the second end and should not be in Uploading state

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

sonarcloud bot commented Oct 16, 2024

Copy link
Contributor

github-actions bot commented Oct 16, 2024

Test Results

3 251 tests  +1   3 145 ✅ +1   4m 0s ⏱️ -15s
  555 suites ±0     106 💤 ±0 
  555 files   ±0       0 ❌ ±0 

Results for commit aa3699e. ± Comparison against base commit 0bc15da.

♻️ This comment has been updated with latest results.

Copy link
Contributor

🐰 Bencher Report

Branchfix/asset-message-transfer-status
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
688,884.23
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
338,957,249.46
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
922,774,759.78
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
21,308,468.82
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.70%. Comparing base (0bc15da) to head (aa3699e).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3063   +/-   ##
========================================
  Coverage    52.70%   52.70%           
========================================
  Files         1317     1317           
  Lines        51108    51111    +3     
  Branches      4742     4742           
========================================
+ Hits         26936    26938    +2     
  Misses       22247    22247           
- Partials      1925     1926    +1     
Files with missing lines Coverage Δ
...logic/feature/message/RetryFailedMessageUseCase.kt 83.18% <100.00%> (+0.45%) ⬆️

... and 1 file with indirect coverage changes


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 0bc15da...aa3699e. Read the comment docs.

@datadog-wireapp
Copy link

Datadog Report

Branch report: fix/asset-message-transfer-status
Commit report: f966128
Test service: kalium-jvm

✅ 0 Failed, 3145 Passed, 106 Skipped, 29.02s Total Time

@@ -178,7 +178,10 @@ class RetryFailedMessageUseCase internal constructor(

else -> handleError("Asset message with transfer status $assetTransferStatus cannot be retried")
}
.onSuccess { retrySendingMessage(it) }
.onSuccess {
updateAssetMessageTransferStatus(AssetTransferStatus.UPLOADED, message.conversationId, message.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: should the status be changed to UPLOADED before the message is actually uploaded? Maybe UPLOAD_IN_PROGRESS would be more appropriate and change to UPLOADED only after the successful resend 🤔

Copy link
Author

Choose a reason for hiding this comment

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

I thought about that - but isnt that status only regarding the asset? We have the additional status for message PENDING etc. Also if we set up this status like that, we can see:

  • Error sending
  • Uploading
  • Uploaded
  • Message pending (until its sent)
  • If there will be any connection problem the message will get back to failed state

@yamilmedina yamilmedina changed the base branch from develop to release/candidate October 16, 2024 08:17
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