Rewrite resolver service #1505
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Depends on
#1 Limit read of well-known files
continuwuation/resolvematrix
Reference
continuwuation/continuwuity!1505
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "s1lv3r/continuwuity:rewrite-resolver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rewrites the resolver service in preparation of removing the overrides system, making the entire service more readable. Have flattened out nested match+if statements, added comments, and removed redundant functions.
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
7661e3c2ec491a3b83a5PR is under pause, waiting for feedback if we should extract the resolver to its own library or make a possible PR to ruma
Latest version should be good, just waiting to see what we do with the external library / ruma choice.
PR will be refactored to use standalone crate by @jade when ready: https://matrix.to/#/!ksTlboXVgcyWjv5GrlEeKyQuJ8ZCprnwQx2b6-BQ44Q/%24fStRIsb1B0-g9Kd5dlBQfL9SZWp6XeN1uF1gJ8hqvZs?via=wolfgirl.pet&via=explodie.org&via=matrix.org
WIP: Rewrite resolver serviceto Rewrite resolver service@ -48,3 +47,2 @@async fn clear_cache(&self) {self.resolver.clear_cache();self.cache.clear().await;// No ability to clean resolvematrix cache at the momentThis PR should probably be blocked until this is possible
I can see two possible solutions:
Alternatively just add a method to resolvematrix's cache.
that works too, ill do that
cache clear feat added in continuwuation/resolvematrix#7, waiting on that + v0.0.4 release, then cache clear will be added
lgtm, far easier to read
Side note, check #1615 hasn't regressed in a test if possible
unsure how to test that one specifically, @Aranjedeath might be best for that?
@s1lv3r wrote in #1505 (comment):
I think it would be testing if srv-only server lookups return correctly ? The bug was we would cache srv-record host information too early so would end up with the wrong port, as an example
I don't think I replicated the bug but I also don't think there's a test case for it
I posted this in the Dev room (link below) but I tried merging this and got an error about complexity, but only in a newer version of Rust (1.94) than we are using (1.92) by default. I don't know if my merge was bad or this is just an error we will see in 2 versions time.
https://matrix.to/#/!ksTlboXVgcyWjv5GrlEeKyQuJ8ZCprnwQx2b6-BQ44Q/%24_w-O0PtF1AODVKadM84oY4HGa-PTBWI76U123e-WFtg?via=explodie.org&via=gingershaped.computer&via=matrix.org
This is currently blocked by continuwuation/resolvematrix#7, will close the review comment once that's merged, released, and implemented
Assuming checks go through properly, this should be ready for merge now
Blocked by continuwuation/resolvematrix#1
/.well-knowntimeout #1755192ef8614df57460d3037d0651267cba3a26e236git commit --fixupand--amend, orgit rebase -ito clean those up@ -1013,0 +1012,4 @@let resolver: &MatrixResolver = if no_cache {&MatrixResolverBuilder::new().dangerous_tls_accept_invalid_certs(self.services.server.config.allow_invalid_tls_certificates_yes_i_know_what_the_fuck_i_am_doing_with_this_and_i_know_this_is_insecure).http_client(self.services.client.well_known.clone())My thought is that we might be using a custom resolver configuration, but I would have to double check that
0242160e95ff1f993607there, commit messages updated
This conflicts with main :( rebase and let cargo update your lockfile
ff1f9936077fac885a98