Skip to content

Update SDK version to 25.03.13 and fix breaking changes #4406

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

Merged
merged 10 commits into from
Mar 19, 2025

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Mar 13, 2025

Content

Changes:

  • Upgrade SDK to v25.03.13.
  • Fix OIDC prompts used for login, remove not supported ones that weren't being used anyway.
  • Make MatrixRoom.isEncrypted optional to take into account the unknown state, added MatrixRoom.getUpdatedIsEncrypted() to fetch the latest value.
  • Make usages of isEncrypted async or default to considering it false if no value is present.
  • Turn TracingInitializer into PlatformInitializer, since it'll start not only the tracing service but also set up the amount of threads the SDK should use.
  • Fixed some more Rust APIs becoming async (such as Client::get_profile or Client::get_notification_settings).
  • Moved all room data to RoomInfo, made sure RustMatrixRoom always has an initial room info instance we can check.

Motivation and context

Upgrading the SDK version was needed and there were lots of API changes.

Tests

  • Check OIDC login still works.
  • Check the UI still matches the DM / encryption info in several screens.
  • Logs should still work as they used to.
  • Notification settings should also be updated without issues.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

Copy link
Contributor

github-actions bot commented Mar 13, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/ujL2xd

Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 62.06897% with 66 lines in your changes missing coverage. Please review.

Project coverage is 80.02%. Comparing base (0c07a81) to head (d7ee751).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...icationsettings/RustNotificationSettingsService.kt 17.64% 14 Missing ⚠️
...droid/libraries/matrix/impl/room/RustMatrixRoom.kt 0.00% 6 Missing ⚠️
...ibraries/matrix/impl/tracing/RustTracingService.kt 0.00% 5 Missing ⚠️
...es/matrix/impl/platform/RustInitPlatformService.kt 0.00% 4 Missing ⚠️
...ement/android/x/initializer/PlatformInitializer.kt 0.00% 3 Missing ⚠️
...ndroid/features/messages/impl/MessagesPresenter.kt 66.66% 0 Missing and 3 partials ⚠️
...ationsettings/RoomNotificationSettingsPresenter.kt 62.50% 0 Missing and 3 partials ⚠️
...rivacy/editroomaddress/EditRoomAddressPresenter.kt 62.50% 2 Missing and 1 partial ⚠️
...roid/libraries/matrix/api/analytics/ViewRoomExt.kt 0.00% 3 Missing ⚠️
...libraries/matrix/impl/room/MatrixRoomInfoMapper.kt 60.00% 1 Missing and 1 partial ⚠️
... and 17 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4406      +/-   ##
===========================================
- Coverage    80.04%   80.02%   -0.03%     
===========================================
  Files         2071     2072       +1     
  Lines        55335    55349      +14     
  Branches      6780     6755      -25     
===========================================
- Hits         44295    44293       -2     
- Misses        8722     8737      +15     
- Partials      2318     2319       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp jmartinesp added the PR-Dependencies Pull requests that update a dependency file label Mar 17, 2025
@jmartinesp jmartinesp marked this pull request as ready for review March 17, 2025 12:43
@jmartinesp jmartinesp requested a review from a team as a code owner March 17, 2025 12:43
@jmartinesp jmartinesp requested review from ganfra and removed request for a team March 17, 2025 12:43
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Looking good overall, thanks for the changes over room info!
2 questions :

  • should we not make sure we call the getUpdatedIsEncrypted in the RoomFlowNode?
  • Maybe we should keep the EncryptionState.Unknown in our layer? at least there are some places where we assert that isEncrypted == encryptionState.ENCRYPTED and so we can display wrong information (like the "room non encrypted" badge).

Edit : I've checked the rust PR and as far as I understand we can't get Unknown anymore. If this is true, then forget my previous questions :P

@jmartinesp jmartinesp force-pushed the misc/upgrade-sdk-25.03.13 branch from a44c7c5 to d7ee751 Compare March 19, 2025 10:56
@jmartinesp
Copy link
Member Author

Edit : I've checked the rust PR and as far as I understand we can't get Unknown anymore. If this is true, then forget my previous questions :P

I've added some code to fetch the encryption state if it's still somehow unknown for some reason (I don't really know which SDK state could make this happen, but better safe than sorry).

Copy link

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, lets merge then!

@jmartinesp jmartinesp merged commit fccd881 into develop Mar 19, 2025
29 of 31 checks passed
@jmartinesp jmartinesp deleted the misc/upgrade-sdk-25.03.13 branch March 19, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants