matrix-org / matrix-org/sytest
`After /purge_history users still get pushed for new messages` flake
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 81
- Forks
- 63
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
https://github.com/matrix-org/synapse/actions/runs/6070182860/job/16465779518
```
# Started: 2023-09-04 07:17:01.879
# Ended: 2023-09-04 07:17:04.922
# Got JSON::number(5), expected 2 for at tests/48admin.pl line 576.
# 0.054136: Registered new user (via secret) @anon-20230904_070440-729:localhost:8839
# 0.120044: Registered new user @anon-20230904_070440-730:localhost:8839
# 0.843307: User @anon-20230904_070440-729:localhost:8839 joined room
# { room_id => "!qzxCvZZbDkHNBlGJSU:localhost:8839" }
# 1.123424: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $ny1MQUwhG0FjvOl6jznwUAJJDK-NFY1vOO-_90l0KUU
# 1.206519: Receipt
# {
# content => {
# "\$ny1MQUwhG0FjvOl6jznwUAJJDK-NFY1vOO-_90l0KUU" => {
# "m.read" => {
# "\@anon-20230904_070440-729:localhost:8839" => { ts => JSON::number(1693811823049) },
# },
# },
# },
# type => "m.receipt",
# }
# 1.308130: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $r1D9MwKGJX99KvYlAgSaKVgdv7ZfX15te-pvKoEYJsc
# 1.440464: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $n2bno8AVIAOQ6Q6o1uxyRNrRFYty199kAGnQVxcqA2E
# 1.564649: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $6g5ts8hBj13k2sWAV1e11opf6lFMuYRAjkYKI-3j3H0
# 1.702517: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $cnGoq3nweDJU30uWbYnFHwn6KnJFD2LFWGk2bNjHJzs
# 1.821504: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $46a07kzdvTy0Lb7u-GkeZrAAKtgPjQ_5c-uap-b_TVo
# 2.115693: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $cSS0SI3_hA-DcLpERaQjFHN1ndkgmrmEQIUjBa_J5BI
# 2.233397: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $IKQSoLOWCBnNjH-uN1p5yiAP0I2K0RdGWTEgURLTMZg
# 2.366796: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $kWE-Gb-_ilDtcT16SNdX1H6-gwg_3HWu4aYwAJT0b4I
# 2.483043: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $rLXInmilT8rCxtlFVSaWLBmw624LF1hNVEL7L6kxf_8
# 2.596196: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $Esvx7Vh65jkejQsnyMNgKKfyQVKRI2683bFtTBQGQPU
# 2.647668: Sync for @anon-20230904_070440-730:localhost:8839
# {
# "device_one_time_keys_count" => { signed_curve25519 => JSON::number(0) },
# "device_unused_fallback_key_types" => [],
# "next_batch" => "s4412_861_14_11_52_3_18_780_0_5",
# "org.matrix.msc2732.device_unused_fallback_key_types" => [],
# "presence" => {
# events => [
# {
# content => {
# currently_active => JSON::true,
# last_active_ago => JSON::number(844),
# presence => "online",
# },
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.presence",
# },
# {
# content => {
# currently_active => JSON::true,
# last_active_ago => JSON::number(1474),
# presence => "online",
# },
# sender => "\@anon-20230904_070440-729:localhost:8839",
# type => "m.presence",
# },
# ],
# },
# "rooms" => {
# join => {
# "!qzxCvZZbDkHNBlGJSU:localhost:8839" => {
# account_data => { events => [] },
# ephemeral => {
# events => [
# {
# content => {
# "\$ny1MQUwhG0FjvOl6jznwUAJJDK-NFY1vOO-_90l0KUU" => {
# "m.read" => {
# "\@anon-20230904_070440-729:localhost:8839" => { ts => JSON::number(1693811823049) },
# },
# },
# },
# type => "m.receipt",
# },
# ],
# },
# state => { events => [] },
# summary => {},
# timeline => {
# events => [
# {
# content => { body => "Message 1", msgtype => "m.text" },
# event_id => "\$r1D9MwKGJX99KvYlAgSaKVgdv7ZfX15te-pvKoEYJsc",
# origin_server_ts => JSON::number(1693811823114),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(1409), transaction_id => 976 },
# },
# {
# content => { body => "Message 2", msgtype => "m.text" },
# event_id => "\$n2bno8AVIAOQ6Q6o1uxyRNrRFYty199kAGnQVxcqA2E",
# origin_server_ts => JSON::number(1693811823235),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(1288), transaction_id => 977 },
# },
# {
# content => { body => "Message 3", msgtype => "m.text" },
# event_id => "\$6g5ts8hBj13k2sWAV1e11opf6lFMuYRAjkYKI-3j3H0",
# origin_server_ts => JSON::number(1693811823369),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(1154), transaction_id => 978 },
# },
# {
# content => { body => "Message 4", msgtype => "m.text" },
# event_id => "\$cnGoq3nweDJU30uWbYnFHwn6KnJFD2LFWGk2bNjHJzs",
# origin_server_ts => JSON::number(1693811823496),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(1027), transaction_id => 979 },
# },
# {
# content => { body => "Message 5", msgtype => "m.text" },
# event_id => "\$46a07kzdvTy0Lb7u-GkeZrAAKtgPjQ_5c-uap-b_TVo",
# origin_server_ts => JSON::number(1693811823631),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(892), transaction_id => 980 },
# },
# {
# content => { body => "Message 6", msgtype => "m.text" },
# event_id => "\$cSS0SI3_hA-DcLpERaQjFHN1ndkgmrmEQIUjBa_J5BI",
# origin_server_ts => JSON::number(1693811823920),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(603), transaction_id => 981 },
# },
# {
# content => { body => "Message 7", msgtype => "m.text" },
# event_id => "\$IKQSoLOWCBnNjH-uN1p5yiAP0I2K0RdGWTEgURLTMZg",
# origin_server_ts => JSON::number(1693811824048),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(475), transaction_id => 982 },
# },
# {
# content => { body => "Message 8", msgtype => "m.text" },
# event_id => "\$kWE-Gb-_ilDtcT16SNdX1H6-gwg_3HWu4aYwAJT0b4I",
# origin_server_ts => JSON::number(1693811824169),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(354), transaction_id => 983 },
# },
# {
# content => { body => "Message 9", msgtype => "m.text" },
# event_id => "\$rLXInmilT8rCxtlFVSaWLBmw624LF1hNVEL7L6kxf_8",
# origin_server_ts => JSON::number(1693811824293),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(230), transaction_id => 984 },
# },
# {
# content => { body => "Message 10", msgtype => "m.text" },
# event_id => "\$Esvx7Vh65jkejQsnyMNgKKfyQVKRI2683bFtTBQGQPU",
# origin_server_ts => JSON::number(1693811824410),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(113), transaction_id => 985 },
# },
# ],
# limited => JSON::true,
# prev_batch => "s4402_861_14_11_52_3_18_780_0_5",
# },
# unread_notifications => {
# highlight_count => JSON::number(0),
# notification_count => JSON::number(0),
# },
# },
# },
# },
# }
# 2.650694: Found event $Esvx7Vh65jkejQsnyMNgKKfyQVKRI2683bFtTBQGQPU for @anon-20230904_070440-730:localhost:8839
# 2.650715: Got message down sync
# 3.000466: Sent 'm.room.message' event in !qzxCvZZbDkHNBlGJSU:localhost:8839: $p3o6N3VdmT0If1wWbXvv2XJiaGMYUok3KdwKGU15Rv8
# 3.040547: Room
# {
# account_data => { events => [] },
# ephemeral => { events => [] },
# state => { events => [] },
# summary => {},
# timeline => {
# events => [
# {
# content => { body => "New Message", msgtype => "m.text" },
# event_id => "\$p3o6N3VdmT0If1wWbXvv2XJiaGMYUok3KdwKGU15Rv8",
# origin_server_ts => JSON::number(1693811824802),
# sender => "\@anon-20230904_070440-730:localhost:8839",
# type => "m.room.message",
# unsigned => { age => JSON::number(115) },
# },
# ],
# limited => JSON::false,
# prev_batch => "s4412_861_14_11_52_3_18_780_0_5",
# },
# unread_notifications => {
# highlight_count => JSON::number(0),
# notification_count => JSON::number(5),
# },
# }
Totals: 813 passed, 11 expected fail, 1 failed
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/48admin.pl around line 576 and the linked GitHub Actions run to reproduce the failure. Compare the expected notification count of 2 with the observed count of 5 after the history purge, and consider the test complete when this scenario no longer flakes and the assertion reliably matches the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100