-
Notifications
You must be signed in to change notification settings - Fork 52
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
Use stable MSC3030 /timestamp_to_event
endpoints
#559
Use stable MSC3030 /timestamp_to_event
endpoints
#559
Conversation
Synapse changes: matrix-org/synapse#14471
@@ -118,7 +118,7 @@ func TestJumpToDateEndpoint(t *testing.T) { | |||
// Make the `/timestamp_to_event` request from Bob's perspective (non room member) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that MSC3030 is merged and stable, do we also need to remove the +build msc3030
build tags from the top here and change these tests to Synapse only instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I've been doing. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Copied from https://github.com/matrix-org/complement/pull/225/files
Added the Dendrite blacklist tags:
complement/tests/room_timestamp_to_event_test.go
Lines 1 to 2 in 9b2ba1a
//go:build !dendrite_blacklist | |
// +build !dendrite_blacklist |
} else if timestampToEventRes.StatusCode != 404 || (timestampToEventRes.StatusCode == 404 && expectedEventId != "") { | ||
t.Fatalf("mustCheckEventisReturnedForTime: /timestamp_to_event request failed with status=%d body=%s", timestampToEventRes.StatusCode, string(timestampToEventResBody)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a small fix to make easier to debug when the endpoint fails.
We now also throw when the endpoint throws a 404 but we were expecting an event.
…d for MSC2716 to share from instead
@@ -1164,42 +1164,6 @@ func includes(needle string, haystack []string) bool { | |||
return false | |||
} | |||
|
|||
func fetchUntilMessagesResponseHas(t *testing.T, c *client.CSAPI, roomID string, check func(gjson.Result) bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this to tests/room_timestamp_to_event_test.go
because we can't reference it from the msc2716
build tag when it's not included.
We don't build with msc2716
in the workers Complement environment (related matrix-org/synapse#14074). So now we can instead reference fetchUntilMessagesResponseHas
from the file that isn't put behind a build tag.
@@ -1126,16 +1126,6 @@ func TestImportHistoricalMessages(t *testing.T) { | |||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the Dendrite CI job is failing on main
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
…4471) Fix #14390 - Client API: `/_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` -> `/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` - Federation API: `/_matrix/federation/unstable/org.matrix.msc3030/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` -> `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` Complement test changes: matrix-org/complement#559
Co-authored-by: Sean Quah <[email protected]>
…4471) Fix #14390 - Client API: `/_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` -> `/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` - Federation API: `/_matrix/federation/unstable/org.matrix.msc3030/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` -> `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` Complement test changes: matrix-org/complement#559
Use stable MSC3030
/timestamp_to_event
endpointsSynapse changes: matrix-org/synapse#14471