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

Remove spec v1.3 check for threads #5997

Merged
merged 3 commits into from
May 10, 2022
Merged

Conversation

turt2live
Copy link
Member

@github-actions
Copy link

github-actions bot commented May 9, 2022

Unit Test Results

122 files  ±0  122 suites  ±0   2m 15s ⏱️ +5s
205 tests ±0  205 ✔️ ±0  0 💤 ±0  0 ±0 
690 runs  ±0  690 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 8570a1e. ± Comparison against base commit 901e397.

♻️ This comment has been updated with latest results.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Just a small remark, also a file for towncrier will have to be added.
I let @ariskotsomitopoulos take over this PR.

@@ -74,8 +74,8 @@ internal fun Versions.isLoginAndRegistrationSupportedBySdk(): Boolean {
* Indicate if the homeserver support MSC3440 for threads
*/
internal fun Versions.doesServerSupportThreads(): Boolean {
return getMaxVersion() >= HomeServerVersion.v1_3_0 ||
unstableFeatures?.get(FEATURE_THREADS_MSC3440_STABLE) ?: false
// TODO: Check for v1.3 or whichever spec version formally specifies MSC3440.
Copy link
Member

Choose a reason for hiding this comment

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

Does this TODO means that it has to be done before merging this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this is a future note so we can find the code site.

@bmarty
Copy link
Member

bmarty commented May 10, 2022

Also I think the version parser should support version without patch number like "v1.3".

The code to update is here: https://github.com/vector-im/element-android/blob/main/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/version/HomeServerVersion.kt#L41

Some unit test could be added too.

Copy link
Contributor

@ariskotsomitopoulos ariskotsomitopoulos 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 PR.

We should keep in mind that already existing clients will have a bad experience. For instance:

  • Bob is a user with the latest Android app
  • Server release v1_3_0 without threads support
  • Bob will try to use dynamic threads instead of the local implementation 👎 <-- (edited this line)
  • When bob (and if) updates the app, will see the expected user experience

I think the only solution to that problem would be if the server waits for threads to go to v1_3_0 and name the new version in something like v1_2_15

@turt2live
Copy link
Member Author

@bmarty yes - the versioning will need fixing, but probably left to a different PR to handle. Will get that changelog added.

@ariskotsomitopoulos thanks for the review! We're removing the v1.3 check because from the spec side we can't guarantee that the server will have support in v1.3, but all known implementations of threads should be available using the stable flag check and thus be fine. This is more a formality for spec compliance as threads will be released in a future spec version.

fwiw, the modern versions (not-r versions) for the spec do not have patch versions.

@turt2live
Copy link
Member Author

I'm not sure why the tests are failing on this, or what the failure is. Can someone take a look?

@turt2live turt2live enabled auto-merge May 10, 2022 20:05
@turt2live turt2live merged commit 019ec6c into develop May 10, 2022
@turt2live turt2live deleted the travis/spec/v1.3-edit/nothreads branch May 10, 2022 20:47
@github-actions
Copy link

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    = passed=15 failures=5 errors=0 skipped=3
  • [org.matrix.android.sdk.account]
    = passed=3 failures=0 errors=0 skipped=2
  • [org.matrix.android.sdk.internal]
    = passed=91 failures=19 errors=0 skipped=38
  • [org.matrix.android.sdk.ordering]
    = passed=16 failures=0 errors=0 skipped=0
  • [org.matrix.android.sdk.PermalinkParserTest]
    = passed=16 failures=0 errors=0 skipped=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants