Skip to content

Add clarification and test to fixed SSS behaviour#19734

Merged
erikjohnston merged 12 commits into
erikj/sss_immediatelyfrom
erikj/sss_clarification
Jun 5, 2026
Merged

Add clarification and test to fixed SSS behaviour#19734
erikjohnston merged 12 commits into
erikj/sss_immediatelyfrom
erikj/sss_clarification

Conversation

@erikjohnston

@erikjohnston erikjohnston commented Apr 27, 2026

Copy link
Copy Markdown
Member

@erikjohnston erikjohnston force-pushed the erikj/sss_clarification branch 2 times, most recently from 1d9fdc1 to 3149105 Compare April 27, 2026 10:03
Comment thread synapse/handlers/sliding_sync/__init__.py Outdated
Comment thread synapse/handlers/sliding_sync/__init__.py Outdated
Comment thread changelog.d/19734.bugfix Outdated
Comment on lines +2291 to +2292
# Advance past the timeout to make sure the request finishes. (We do this
# to ensure log contexts don't leak between tests).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which logcontext is being leaked here?


Here was my gut reaction:

Overall, we shouldn't be worrying about LoggingContext problems in the tests,

[...] it's expected that test things run outside of Synapse and by their nature should happen in the sentinel logcontext. And if we really don't want to see these kind of errors, we would need to refactor get_success(...) to look more like get_success(func, OTHER_SERVER, ev) where we call the function with some homeserver_test_case logcontext instead of passing in an awaitable.

-- @MadLittleMods, #18937 (comment)

@erikjohnston erikjohnston Apr 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing test failures. I'm not entirely sure what was going on, but the trial jobs started failing when running in parallel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finishing a request to be a good citizen seems fine. The extra complexity in the test is a bit distracting and slightly tricky to figure out that it isn't related to what we're testing. Perhaps a better comment could dispel things better as I read but the current language is fine ⏩

Also makes me wonder what happens if the test fails in the middle of a request (seems like we would run into the same problem).

Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py
Comment thread tests/rest/client/sliding_sync/test_sliding_sync.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment on lines +2291 to +2292
# Advance past the timeout to make sure the request finishes. (We do this
# to ensure log contexts don't leak between tests).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finishing a request to be a good citizen seems fine. The extra complexity in the test is a bit distracting and slightly tricky to figure out that it isn't related to what we're testing. Perhaps a better comment could dispel things better as I read but the current language is fine ⏩

Also makes me wonder what happens if the test fails in the middle of a request (seems like we would run into the same problem).

Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread synapse/handlers/sliding_sync/__init__.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py Outdated
Comment thread tests/rest/client/sliding_sync/test_rooms_required_state.py
@erikjohnston erikjohnston changed the base branch from develop to erikj/sss_immediately June 5, 2026 09:47
@erikjohnston erikjohnston merged commit cbc7f6b into erikj/sss_immediately Jun 5, 2026
40 of 41 checks passed
@erikjohnston erikjohnston deleted the erikj/sss_clarification branch June 5, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants