Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Don't send device list updates upon registration #3307

Merged
merged 4 commits into from
Jan 20, 2024

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Jan 18, 2024

Fixes #3273

As we otherwise send down device list updates which are merely useful for the user and causes tests to be flakey:

❌ TestPushSync/Adding_a_push_rule_wakes_up_an_incremental_/sync (10ms)
      push_test.go:57: no pushrules found in sync response: {"next_batch":"s0_0_0_0_0_1_1_0_1","device_lists":{"changed":["@user-1:hs1"]}}

What this does: If a PerformDeviceCreation request is coming from registering an account, it does not send device list updates, as they are merely useful (no joined rooms, no one to inform) . In all other cases, the behavior is unchanged and device list updates are sent as usual.

@S7evinK S7evinK added tests Issues related to tests. Missing/Flakey/etc T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Jan 18, 2024
@S7evinK S7evinK requested a review from a team as a code owner January 18, 2024 08:39
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (bebf701) 65.33% compared to head (4494a29) 65.28%.

Files Patch % Lines
userapi/internal/key_api.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3307      +/-   ##
==========================================
- Coverage   65.33%   65.28%   -0.05%     
==========================================
  Files         509      509              
  Lines       57488    57493       +5     
==========================================
- Hits        37560    37536      -24     
- Misses      16028    16052      +24     
- Partials     3900     3905       +5     
Flag Coverage Δ
unittests 50.01% <76.92%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@S7evinK
Copy link
Contributor Author

S7evinK commented Jan 18, 2024

Also sneakily changes the project coverage threshold to 0.1%, as it is quite annoying to have CI failing just because a nightly run had slightly higher coverage.

@S7evinK S7evinK merged commit d357615 into main Jan 20, 2024
20 checks passed
@S7evinK S7evinK deleted the s7evink/deflake-push-test branch January 20, 2024 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. tests Issues related to tests. Missing/Flakey/etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complement flake TestPushSync/Adding_a_push_rule_wakes_up_an_incremental
1 participant