fix(complement): Build with the openreg feature #2456
No reviewers
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 milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity!2456
Loading…
Reference in a new issue
No description provided.
Delete branch "bardi/continuwuity:fix/complement-openreg"
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?
Since challengeless registration was gated behind the
openregfeature (!2189), building with plaincargo build -p conduwuitproduces a server that refuses Complement's registrations, so almost every test fails.This pull request updates the testing docs and the runner's build hints to enable the feature.
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
The binary and docs changes look good, but I'm concerned by the number of seemingly false fails in the updated results. I think, given that the new fails took erroneous, the updated test results diff should just be removed from this PR since it doesn't really indicate anything. Happy to merge then!
(comments on diffs are mainly so I can investigate later, feel free to comment on them, but you can just ignore them)
@ -35,3 +32,7 @@{"Action":"pass","Test":"TestCannotSendNonJoinViaSendJoinV1/leave_event"}{"Action":"pass","Test":"TestCannotSendNonJoinViaSendJoinV1/non-state_membership_event"}{"Action":"pass","Test":"TestCannotSendNonJoinViaSendJoinV1/regular_event"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1/event_with_mismatched_state_key"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1/invite_event"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1/knock_event"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1/leave_event"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1/non-state_membership_event"}{"Action":"fail","Test":"TestCannotSendNonJoinViaSendJoinV1/regular_event"}This seems wrong - we don't implement this endpoint, I'm not sure how we can fail this test?
Upstream flake: https://github.com/matrix-org/complement/issues/954
@ -56,3 +53,7 @@{"Action":"pass","Test":"TestCannotSendNonLeaveViaSendLeaveV1/knock_event"}{"Action":"pass","Test":"TestCannotSendNonLeaveViaSendLeaveV1/non-state_membership_event"}{"Action":"pass","Test":"TestCannotSendNonLeaveViaSendLeaveV1/regular_event"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1/event_with_mismatched_state_key"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1/invite_event"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1/join_event"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1/knock_event"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1/non-state_membership_event"}{"Action":"fail","Test":"TestCannotSendNonLeaveViaSendLeaveV1/regular_event"}This also seems wrong as we don't implement this endpoint either
Upstream flake also: https://github.com/matrix-org/complement/issues/954
@ -201,3 +196,7 @@{"Action":"pass","Test":"TestInviteFiltering/Can_block_a_whole_server"}{"Action":"pass","Test":"TestInviteFiltering/Can_glob_serveral_servers"}{"Action":"pass","Test":"TestInviteFiltering/Can_glob_serveral_users"}{"Action":"fail","Test":"TestInviteFiltering"}{"Action":"fail","Test":"TestInviteFiltering/Can_allow_a_user_from_a_blocked_server"}{"Action":"fail","Test":"TestInviteFiltering/Can_block_a_single_user"}{"Action":"fail","Test":"TestInviteFiltering/Can_block_a_user_from_an_allowed_server"}{"Action":"fail","Test":"TestInviteFiltering/Can_block_a_whole_server"}{"Action":"fail","Test":"TestInviteFiltering/Can_glob_serveral_servers"}{"Action":"fail","Test":"TestInviteFiltering/Can_glob_serveral_users"}This seems wrong based on our own test suite asserting that this is correct:
#[cfg(test)]mod tests {use assign::assign;use ruma::{ServerName, UserId,events::{GlobalAccountDataEvent, invite_permission_config::InvitePermissionAction},user_id,};use serde_json::{from_value as from_json_value, json};use crate::invite_permission_config::{FilterLevel, InvitePermissionConfigEventContent};fn user_id(id: &str) -> &UserId { <&UserId>::try_from(id).unwrap() }fn server_name(name: &str) -> &ServerName { <&ServerName>::try_from(name).unwrap() }#[test]fn default_values() {let data = json!({"content": {},"type": "org.matrix.msc4155.invite_permission_config"});let event: GlobalAccountDataEvent<InvitePermissionConfigEventContent> =from_json_value(data).unwrap();assert!(event.content.enabled);assert!(event.content.allowed_users.is_empty());assert!(event.content.ignored_users.is_empty());assert!(event.content.blocked_users.is_empty());assert!(event.content.allowed_servers.is_empty());assert!(event.content.ignored_servers.is_empty());assert!(event.content.blocked_servers.is_empty());assert_eq!(event.content.user_filter_level(user_id("@alice:example.com")),FilterLevel::Default);assert_eq!(event.content.server_filter_level(server_name("example.com")),FilterLevel::Default);}#[test]fn block_the_world() {let event = InvitePermissionConfigEventContent {enabled: true,Looks like it's just a mismatched error code
Opened #2457
@ -262,3 +262,3 @@{"Action":"pass","Test":"TestKnocking/A_user_that_is_banned_from_a_room_cannot_knock_on_it"}{"Action":"pass","Test":"TestKnocking/A_user_that_is_banned_from_a_room_cannot_knock_on_it#01"}{"Action":"pass","Test":"TestKnocking/Attempting_to_join_a_room_with_join_rule_'knock'_without_an_invite_should_fail"}{"Action":"fail","Test":"TestKnocking/Attempting_to_join_a_room_with_join_rule_'knock'_without_an_invite_should_fail"}This seems like a flake - event auth mandates that the user is joined or invited to transition to join
Federation-related flake instead, fun
@ -288,3 +288,3 @@{"Action":"pass","Test":"TestKnockingInMSC3787Room/A_user_that_is_banned_from_a_room_cannot_knock_on_it"}{"Action":"pass","Test":"TestKnockingInMSC3787Room/A_user_that_is_banned_from_a_room_cannot_knock_on_it#01"}{"Action":"pass","Test":"TestKnockingInMSC3787Room/Attempting_to_join_a_room_with_join_rule_'knock'_without_an_invite_should_fail"}{"Action":"fail","Test":"TestKnockingInMSC3787Room/Attempting_to_join_a_room_with_join_rule_'knock'_without_an_invite_should_fail"}See before
@ -315,2 +315,2 @@{"Action":"pass","Test":"TestLogin/parallel/Login_with_uppercase_username_works_and_GET_/whoami_afterwards_also"}{"Action":"pass","Test":"TestLogin/parallel/POST_/login_as_non-existing_user_is_rejected"}{"Action":"fail","Test":"TestLogin/parallel/Login_with_uppercase_username_works_and_GET_/whoami_afterwards_also"}{"Action":"fail","Test":"TestLogin/parallel/POST_/login_as_non-existing_user_is_rejected"}I find it improbable that we're capable of issuing logins for users we don't know about
First fail is an upstream issue: https://github.com/matrix-org/complement/issues/950
Second fail is a semantic issue (404 user not found vs 403... something or other):
@ -422,3 +428,4 @@{"Action":"pass","Test":"TestPowerLevels/GET_/rooms/:room_id/state/m.room.power_levels_can_fetch_levels"}{"Action":"fail","Test":"TestPowerLevels"}{"Action":"fail","Test":"TestPowerLevels/GET_/rooms/:room_id/state/m.room.power_levels_can_fetch_levels"}{"Action":"pass","Test":"TestPowerLevels/PUT_/rooms/:room_id/state/m.room.power_levels_can_set_levels"}{"Action":"pass","Test":"TestPowerLevels/PUT_power_levels_should_not_explode_if_the_old_power_levels_were_empty"}{"Action":"fail","Test":"TestPowerLevels/PUT_power_levels_should_not_explode_if_the_old_power_levels_were_empty"}These failures seem unlikely
One upstream bug https://github.com/matrix-org/complement/issues/957
The second fail is because we return 403 instead of 400, which is a bit silly since it's an auth check fail and not a validation failure, but complement ensures the latter:
github.com/matrix-org/complement@7b38a63c9d/tests/csapi/power_levels_test.go (L214-L229).@ -480,2 +488,3 @@{"Action":"pass","Test":"TestRegistration/parallel/POST_/register_rejects_if_user_already_exists"}{"Action":"pass","Test":"TestRegistration/parallel/POST_/register_rejects_usernames_with_special_characters"}{"Action":"fail","Test":"TestRegistration/parallel/POST_/register_downcases_capitals_in_usernames"}{"Action":"fail","Test":"TestRegistration/parallel/POST_/register_rejects_if_user_already_exists"}{"Action":"fail","Test":"TestRegistration/parallel/POST_/register_rejects_usernames_with_special_characters"}These don't sound like they actually fail
Two upstream issues:
@ -594,5 +604,5 @@{"Action":"pass","Test":"TestRoomMembers/Parallel/POST_/join/:room_alias_can_join_a_room"}{"Action":"fail","Test":"TestRoomMembers/Parallel/POST_/join/:room_alias_can_join_a_room"}{"Action":"fail","Test":"TestRoomMembers/Parallel/POST_/join/:room_alias_can_join_a_room_with_custom_content"}{"Action":"pass","Test":"TestRoomMembers/Parallel/POST_/join/:room_id_can_join_a_room"}{"Action":"fail","Test":"TestRoomMembers/Parallel/POST_/join/:room_id_can_join_a_room"}{"Action":"fail","Test":"TestRoomMembers/Parallel/POST_/join/:room_id_can_join_a_room_with_custom_content"}{"Action":"pass","Test":"TestRoomMembers/Parallel/POST_/rooms/:room_id/ban_can_ban_a_user"}{"Action":"fail","Test":"TestRoomMembers/Parallel/POST_/rooms/:room_id/ban_can_ban_a_user"}I feel like we'd know if these three core functionalities were broken 🧐
Upstream issues:
@ -642,3 +655,3 @@{"Action":"pass","Test":"TestRoomsInvite/Parallel/Invited_user_can_see_room_metadata"}{"Action":"pass","Test":"TestRoomsInvite/Parallel/Test_that_we_can_be_reinvited_to_a_room_we_created"}{"Action":"pass","Test":"TestRoomsInvite/Parallel/Uninvited_users_cannot_join_the_room"}{"Action":"fail","Test":"TestRoomsInvite/Parallel/Uninvited_users_cannot_join_the_room"}This again sounds unlikely
Like the knock fails, this too is due to federation
(sorry for the inevitable notification spam)
daab85893ffc10d439d4@nex sure, I have removed the second commit.
Awesome, thanks for removing the diff - happy to merge as-is then
(TODO: re-run complement after all of https://github.com/matrix-org/complement/issues?q=is%3Aissue+state%3Aopen+author%3Atimedoutuk are resolved)
fc10d439d4ae2a06dd93ae2a06dd9315f7aabca6