anonymousland-synapse/changelog.d
Eric Eastwood 860fdd9098
Fix @tag_args being off-by-one (ahead) (#13452)
Fix @tag_args being off-by-one (ahead)

Example:

```
argspec.args=[
  'self',
  'room_id'
]

args=(
  <synapse.storage.databases.main.DataStore object at 0x10d0b8d00>,
  '!HBehERstyQBxyJDLfR:my.synapse.server'
)
```

---

The previous logic was also flawed and we can end up in a situation like this:

```
argspec.args=['self', 'dest', 'room_id', 'limit', 'extremities']

args=(<synapse.federation.federation_client.FederationClient object at 0x7f1651c18160>, 'hs1', '!jAEHKIubyIfuLOdfpY:hs1')
```

From this source:
```py
async def backfill(
    self, dest: str, room_id: str, limit: int, extremities: Collection[str]
) -> Optional[List[EventBase]]:
```

And this usage:
```py
events = await self._federation_client.backfill(
    dest, room_id, limit=limit, extremities=extremities
)
```

which would previously cause this error:
```
synapse_main | 2022-08-04 06:13:12,051 - synapse.handlers.federation - 424 - ERROR - GET-5 - Failed to backfill from hs1 because tuple index out of range
synapse_main | Traceback (most recent call last):
synapse_main |   File "/usr/local/lib/python3.9/site-packages/synapse/handlers/federation.py", line 392, in try_backfill
synapse_main |     await self._federation_event_handler.backfill(
synapse_main |   File "/usr/local/lib/python3.9/site-packages/synapse/logging/tracing.py", line 828, in _wrapper
synapse_main |     return await func(*args, **kwargs)
synapse_main |   File "/usr/local/lib/python3.9/site-packages/synapse/handlers/federation_event.py", line 593, in backfill
synapse_main |     events = await self._federation_client.backfill(
synapse_main |   File "/usr/local/lib/python3.9/site-packages/synapse/logging/tracing.py", line 828, in _wrapper
synapse_main |     return await func(*args, **kwargs)
synapse_main |   File "/usr/local/lib/python3.9/site-packages/synapse/logging/tracing.py", line 827, in _wrapper
synapse_main |     with wrapping_logic(func, *args, **kwargs):
synapse_main |   File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__
synapse_main |     return next(self.gen)
synapse_main |   File "/usr/local/lib/python3.9/site-packages/synapse/logging/tracing.py", line 922, in _wrapping_logic
synapse_main |     set_attribute("ARG_" + arg, str(args[i + 1]))  # type: ignore[index]
synapse_main | IndexError: tuple index out of range
```
2022-08-04 14:29:41 -05:00
..
.gitignore Correct attrs package name in requirements (#3492) 2018-07-07 10:46:59 +10:00
12978.misc Extend the release script to automatically push a new SyTest branch, rather than having that be a manual process. (#12978) 2022-07-26 18:08:14 +01:00
13160.misc Make minor clarifications to the error messages given when we fail to join a room via any server. (#13160) 2022-07-27 10:37:50 +00:00
13213.misc Enable Complement CI tests in the 'latest deps' test run. (#13213) 2022-08-01 10:55:31 +00:00
13221.doc Explicitly mention which resources support compression in the config guide (#13221) 2022-07-29 09:09:57 +00:00
13230.doc Improve documentation on becoming server admin (#13230) 2022-08-03 11:15:23 +01:00
13343.feature Implement MSC3848: Introduce errcodes for specific event sending failures (#13343) 2022-07-27 13:44:40 +01:00
13346.misc Fix get_pdu asking every remote destination even after it finds an event (#13346) 2022-07-27 10:40:04 +01:00
13353.bugfix Fix infinite loop in partial-state resync (#13353) 2022-07-26 11:47:31 +00:00
13355.misc Faster room joins: avoid blocking when pulling events with missing prevs (#13355) 2022-07-26 12:39:23 +01:00
13365.bugfix Remove the unspecced room_id field in the /hierarchy response. (#13365) 2022-07-26 08:02:34 -04:00
13368.misc Instrument /messages for understandable traces in Jaeger (#13368) 2022-08-03 10:57:38 -05:00
13370.feature Use stable prefixes for MSC3827: filtering of /publicRooms by room type (#13370) 2022-07-27 19:46:57 +01:00
13372.docker Install cryptography build dependencies in requirements image. (#13372) 2022-08-03 11:16:32 +01:00
13374.bugfix Return 404 or member list when getting joined_members after leaving (#13374) 2022-08-03 14:26:31 +02:00
13383.misc Remove unused argument for get_relations_for_event. (#13383) 2022-07-26 07:19:20 -04:00
13392.bugfix Copy room serials before handling in get_new_events_as (#13392) 2022-07-26 17:45:27 +00:00
13393.misc Add a merge-back command to the release script, which automates merging the correct branches after a release. (#13393) 2022-08-02 15:56:28 +00:00
13397.misc Add missing type hints for tests.unittest. (#13397) 2022-07-27 17:18:41 +00:00
13403.misc Faster Room Joins: don't leave a stuck room partial state flag if the join fails. (#13403) 2022-08-01 16:45:39 +00:00
13404.misc Refactor _resolve_state_at_missing_prevs to return an EventContext (#13404) 2022-08-01 13:53:56 +01:00
13408.bugfix Fix rooms not being properly excluded from incremental sync (#13408) 2022-08-04 11:02:29 +02:00
13413.bugfix Faster joins: fix rejected events becoming un-rejected during resync (#13413) 2022-08-01 11:20:05 +01:00
13416.misc Faster Room Joins: prevent Synapse from answering federated join requests for a room which it has not fully joined yet. (#13416) 2022-08-04 16:27:04 +01:00
13420.misc Re-enable running Complement tests against Synapse with workers. (#13420) 2022-08-01 11:51:44 +01:00
13428.feature Add module API method to resolve a room alias to a room ID (#13428) 2022-08-03 09:25:36 +00:00
13429.feature Add module API method to create a room (#13429) 2022-08-04 09:34:05 +00:00
13431.misc Fix missing import in federation_event handler. (#13431) 2022-08-01 14:14:29 +00:00
13432.bugfix Fix error when out of servers to sync partial state with (#13432) 2022-08-02 12:12:44 +01:00
13435.misc Optimise async get event lookups (#13435) 2022-08-04 15:49:55 +01:00
13437.doc Fix wrong headline for url_preview_accept_language in docs (#13437) 2022-08-03 09:41:57 +01:00
13438.doc Remove 'Contents' section from the Configuration Manual (#13438) 2022-08-03 09:19:20 +00:00
13439.misc Add some tracing spans to give insight into local joins (#13439) 2022-08-03 10:19:34 -07:00
13442.misc Rename RateLimitConfig to RatelimitSettings (#13442) 2022-08-03 10:40:20 +01:00
13443.doc Update doc for setting macaroon_secret_key (#13443) 2022-08-03 10:41:19 +01:00
13447.misc synapse-workers docker: copy nginx and redis in from base images (#13447) 2022-08-04 12:59:27 +01:00
13449.doc Update some outdated information on sso_mapping_providers.md (#13449) 2022-08-04 13:06:02 +01:00
13450.doc Fix return value in example on password_auth_provider_callbacks.md (#13450) 2022-08-04 13:03:36 +01:00
13452.misc Fix @tag_args being off-by-one (ahead) (#13452) 2022-08-04 14:29:41 -05:00
13455.misc Improve comments (& avoid a duplicate query) in push actions processing. (#13455) 2022-08-04 19:24:44 +00:00
13460.misc Update type of EventContext.rejected (#13460) 2022-08-04 17:45:01 +01:00