chore: Remove the old Latest Event API#5624
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5624 +/- ##
==========================================
- Coverage 88.57% 88.50% -0.07%
==========================================
Files 363 362 -1
Lines 104838 103281 -1557
Branches 104838 103281 -1557
==========================================
- Hits 92856 91407 -1449
+ Misses 7625 7533 -92
+ Partials 4357 4341 -16 ☔ View full report in Codecov by Sentry. |
dcb8306 to
03e6102
Compare
CodSpeed Performance ReportMerging #5624 will not alter performanceComparing Summary
|
eba17c6 to
31e3911
Compare
|
This depends on #5617, right? |
|
#5617 can be merged after this PR, it won't add any regression. Right now, with the old Latest Event API was not supporting local events, so it was impossible to sort by them. However, #3872 must be addressed so that re-decryption happens in the Event Cache. The old Latest Event API has its own re-decryption mechanism. Knowing that the new Latest Event API relies on the Event Cache, as long as the Event Cache doesn't support redecryption, we will have a regression. So:
|
Ah, because #5587 added the new way to do latest events, and #5617 will only do the sorting based on the latest event. Right, sorry for being confused. |
31e3911 to
9d9a9dc
Compare
|
Rebased on top of |
9d9a9dc to
8266ef8
Compare
poljar
left a comment
There was a problem hiding this comment.
Nice, though I think we don't want to just drop the old values because a field got renamed.
Also, I think that this warrants a changelog entry.
| /// TODO(@hywan): Rename to `latest_event`. | ||
| #[serde(default)] | ||
| pub(crate) new_latest_event: LatestEventValue, | ||
| pub(crate) latest_event_value: LatestEventValue, |
There was a problem hiding this comment.
Won't this cause some values to be lost? Don't you need a serde alias for this rename to be a no-op?
There was a problem hiding this comment.
Is it annoying? This feature hasn't been part of the stable version of most clients. At worse, we are just losing a “cached” data, which is easily computed. My question is: do we need to maintain compatibility in this case?
There was a problem hiding this comment.
Didn't the EX clients switch to this API? Won't they lose the latest event in that case?
If not, feel free to leave the alias out.
There was a problem hiding this comment.
We agreed in our internal chat room that it's fine to drop. Only “nightly” or “beta” versions of Element X are using it, and no other clients seem to have switched to it so far. Moreover, Element X is using the LatestEventValue only recently in the UI: prior to that, it was only used by the Room List to sort items, but it was “invisible” to the app.
So satisfying.
This patch removes the “new_” prefix to the latest event API.
e6da730 to
3121f27
Compare
|
I've resolved the merge conflict. All good now. |
This set of patches remove the old latest event API, since the new one is now available and working.
Finally, this set of patches also remove the
new_prefix from the new latest event API.🎉