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: changing profile avatar doesn't reflect update (WPB-5494) #2443

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

alexandreferris
Copy link
Contributor


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

When changing user profile avatar it wasn't being reflected in other screens in the app

Causes (Optional)

the query updateUser was a transaction returning SELECT changes(), thus sqldelight not emitting the update on the table.

Solutions

Remove transaction and SELECT changes() from the query and add transactionWithResult on the DAOImpl to properly reflect the changes upwards when needed.

Testing

How to Test

  • Use this branch on AR
  • Open Profile Screen and change profile avatar
  • go back and check that profile avatar change is reflected across other screens

Notes (Optional)

@vitorhugods opened an issue on SQLDelight : sqldelight/sqldelight#5001

Copy link
Contributor

github-actions bot commented Feb 2, 2024

Test Results

2 771 tests   2 643 ✔️  30s ⏱️
   481 suites     128 💤
   481 files           0

Results for commit 911cd66.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Feb 2, 2024

Datadog Report

All test runs bd1a236 🔗

2 Total Test Services: 0 Failed, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Test Service View
kalium-ios 0 0 0 2643 128 11m 1.15s Link
kalium-jvm 0 0 0 2767 122 9m 3.05s Link

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (release/candidate@209485c). Click here to learn what that means.

Additional details and impacted files
@@                 Coverage Diff                  @@
##             release/candidate    #2443   +/-   ##
====================================================
  Coverage                     ?   58.29%           
  Complexity                   ?       21           
====================================================
  Files                        ?     1166           
  Lines                        ?    45024           
  Branches                     ?     4234           
====================================================
  Hits                         ?    26246           
  Misses                       ?    16894           
  Partials                     ?     1884           

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 209485c...911cd66. Read the comment docs.

@alexandreferris alexandreferris merged commit 8d49d90 into release/candidate Feb 2, 2024
17 checks passed
@alexandreferris alexandreferris deleted the fix/changing_profile_avatar branch February 2, 2024 14:32
github-actions bot pushed a commit that referenced this pull request Feb 2, 2024
* fix: remove SELECT changes from updateUser query

* fix: add transactionWithResult when updateUser and return select changes

* test: add tests for observing user details by id
github-merge-queue bot pushed a commit that referenced this pull request Feb 5, 2024
* fix: changing profile avatar doesn't reflect update (WPB-5494) (#2443)

* fix: remove SELECT changes from updateUser query

* fix: add transactionWithResult when updateUser and return select changes

* test: add tests for observing user details by id

* fix: add UPDATE OR FAIL to update query and remove select changes query as it is not used anymore

* fix: remove unused select changes query and change return type of updateUser to Unit

* fix: adjust existing tests

---------

Co-authored-by: Alexandre Ferris <[email protected]>
augustocdias pushed a commit that referenced this pull request Feb 13, 2024
* fix: changing profile avatar doesn't reflect update (WPB-5494) (#2443)

* fix: remove SELECT changes from updateUser query

* fix: add transactionWithResult when updateUser and return select changes

* test: add tests for observing user details by id

* fix: add UPDATE OR FAIL to update query and remove select changes query as it is not used anymore

* fix: remove unused select changes query and change return type of updateUser to Unit

* fix: adjust existing tests

---------

Co-authored-by: Alexandre Ferris <[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.

4 participants