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

Update ACLs when received as outliers #3008

Merged
merged 15 commits into from
Nov 22, 2023
Merged

Update ACLs when received as outliers #3008

merged 15 commits into from
Nov 22, 2023

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Mar 10, 2023

This should fix #3004 by making sure we also update our in-memory ACLs after joining a new room.
Also makes use of more caching in GetStateEvent

Bonus: Adds some tests, as I was about to use GetBulkStateContent, but turns out that GetStateEvent is basically doing the same, just that it only gets the eventTypeNID/eventStateKeyNID once and not for every call.

@S7evinK S7evinK added tests Issues related to tests. Missing/Flakey/etc T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Mar 10, 2023
@S7evinK S7evinK requested a review from a team as a code owner March 10, 2023 15:22
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

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

Comparison is base (c4528b2) 65.77% compared to head (99b9ada) 63.80%.

Files Patch % Lines
roomserver/internal/input/input_events.go 68.42% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3008      +/-   ##
==========================================
- Coverage   65.77%   63.80%   -1.97%     
==========================================
  Files         507      510       +3     
  Lines       57292    64142    +6850     
==========================================
+ Hits        37682    40929    +3247     
- Misses      15802    19168    +3366     
- Partials     3808     4045     +237     
Flag Coverage Δ
unittests 49.57% <64.70%> (-0.03%) ⬇️

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.

roomserver/internal/input/input_events.go Outdated Show resolved Hide resolved
roomserver/storage/shared/storage.go Outdated Show resolved Hide resolved
roomserver/internal/input/input_events.go Outdated Show resolved Hide resolved
@S7evinK S7evinK merged commit b8f9148 into main Nov 22, 2023
18 of 20 checks passed
@S7evinK S7evinK deleted the s7evink/acls branch November 22, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Dendrite does not respect m.room.server_acl on room join
2 participants