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: Properly updating draft message [WPB-14271] 🍒 #3105

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 14, 2024

BugWPB-14271 [Android] reply draft is not cleared when clicking the x icon

This PR was automatically cherry-picked based on the following PR:

Original PR description:


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

What's new in this PR?

Issues

We could not get rid of quoted or edited message from draft

Causes (Optional)

We were trying to update draft values to null when removing quoted or edited messages which was failing on the database query check, so in fact we're never updating actual value to a default null one

Solutions

Changed != check in database to IS NOT - comparing value and null with != is returning NULL not true or false if Im not mistaken. I've also added tests to cover other draft fields update


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 github-actions bot added cherry-pick PR is cherry-picking changes from another banch type: bug / fix 🐞 👕 size: M labels Nov 14, 2024
Copy link
Contributor Author

github-actions bot commented Nov 14, 2024

Test Results

3 277 tests  +6   3 170 ✅ +6   4m 42s ⏱️ +22s
  557 suites ±0     107 💤 ±0 
  557 files   ±0       0 ❌ ±0 

Results for commit bf2e7db. ± Comparison against base commit 837f7ea.

This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpserting_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraftWithoutQuotedMessageId_whenUpsertingQuotedMessageId_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpsertingDifferentEditMessageId_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpsertingDifferentQuotedMessageId_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpsertingEmptyMentionList_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpsertingNullEditMessageId_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpsertingNullQuotedMessageId_thenItShouldBeProperlyUpdatedInDb[jvm]
com.wire.kalium.persistence.dao.message.draft.MessageDraftDAOTest ‑ givenAlreadyExistingMessageDraft_whenUpsertingTextChange_thenItShouldBeProperlyUpdatedInDb[jvm]

♻️ This comment has been updated with latest results.

Copy link
Contributor Author

🐰 Bencher Report

Branchfix/updating-draft-message-fields-cherry-pick
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
665,428.32
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
351,617,010.98
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,316,690,575.89
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
21,464,965.26
🐰 View full continuous benchmarking report in Bencher

@MohamadJaara MohamadJaara added this pull request to the merge queue Nov 14, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.20%. Comparing base (837f7ea) to head (bf2e7db).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3105      +/-   ##
===========================================
- Coverage    54.21%   54.20%   -0.01%     
===========================================
  Files         1196     1196              
  Lines        35596    35596              
  Branches      3625     3625              
===========================================
- Hits         19297    19296       -1     
  Misses       14900    14900              
- Partials      1399     1400       +1     

see 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 837f7ea...bf2e7db. Read the comment docs.

@datadog-wireapp
Copy link

Datadog Report

Branch report: fix/updating-draft-message-fields-cherry-pick
Commit report: 6e8309b
Test service: kalium-jvm

✅ 0 Failed, 3170 Passed, 107 Skipped, 33.79s Total Time

Merged via the queue into develop with commit f2ae88b Nov 14, 2024
22 checks passed
@MohamadJaara MohamadJaara deleted the fix/updating-draft-message-fields-cherry-pick branch November 14, 2024 13:55
@echoes-hq echoes-hq bot added the echoes: product-roadmap/bug Work contributing to resolve a bug not critical enough to have raised an incident. label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch echoes: product-roadmap/bug Work contributing to resolve a bug not critical enough to have raised an incident. 👕 size: M type: bug / fix 🐞
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants