Skip to content

Improve compliance with MSC3266#4155

Merged
toger5 merged 15 commits intomatrix-org:developfrom
AndrewFerr:msc-3266-compliance
Apr 22, 2024
Merged

Improve compliance with MSC3266#4155
toger5 merged 15 commits intomatrix-org:developfrom
AndrewFerr:msc-3266-compliance

Conversation

@AndrewFerr
Copy link
Copy Markdown
Member

@AndrewFerr AndrewFerr commented Apr 11, 2024

This fixes some non-compliance with MSC 3266, and exports the payload type.

Signed-off-by: Andrew Ferrazzutti andrewf@element.io

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

Also remove redundant room_type field which is inherited from elsewhere
Use the endpoint recommended by the MSC
@AndrewFerr AndrewFerr requested a review from a team as a code owner April 11, 2024 16:25
@t3chguy
Copy link
Copy Markdown
Member

t3chguy commented Apr 12, 2024

Please improve the PR title given it will be used in the changelog verbatim

Copy link
Copy Markdown
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane otherwise

@AndrewFerr AndrewFerr changed the title MSC 3266 compliance Improve compliance with MSC3266 Apr 12, 2024
@AndrewFerr
Copy link
Copy Markdown
Member Author

Please improve the PR title given it will be used in the changelog verbatim

Done -- let me know if the title still needs changing.

I am also willing to add an integration test for this.

@t3chguy
Copy link
Copy Markdown
Member

t3chguy commented Apr 12, 2024

Yeah looks like CI won't let it in without testing

@AndrewFerr
Copy link
Copy Markdown
Member Author

Good thing CI is strict, because this PR requires a Synapse change too: element-hq/synapse#17078

@t3chguy
Copy link
Copy Markdown
Member

t3chguy commented Apr 12, 2024

So we'll likely need fallback code then
for older Synapse support

@AndrewFerr
Copy link
Copy Markdown
Member Author

So we'll likely need fallback code then for older Synapse support

The Synapse PR has a fallback: it responds to both the old & new endpoint used by getRoomSummary.

Then again, getRoomSummary could also have a fallback: if it gets a 404 response for the new endpoint, it can retry at the old endpoint. I'll add that now.

@AndrewFerr
Copy link
Copy Markdown
Member Author

Hm, even with the integration test, the code analysis check is failing. What needs to be added to fix that?

Other than that, bd09442 adds the fallback, so once the check is fixed, this should PR be ready.

@t3chguy
Copy link
Copy Markdown
Member

t3chguy commented Apr 15, 2024

Hm, even with the integration test, the code analysis check is failing

It says you reached 33.3% coverage, out of the required 80%.

image

Things marked red are untested.

Copy link
Copy Markdown
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane

@AndrewFerr
Copy link
Copy Markdown
Member Author

Alright, code coverage for new code is now at 100%, so this should be done.

@AndrewFerr
Copy link
Copy Markdown
Member Author

Do I need to rebase this PR branch before it can be merged?

@toger5 toger5 added this pull request to the merge queue Apr 22, 2024
Merged via the queue into matrix-org:develop with commit e874468 Apr 22, 2024
@AndrewFerr AndrewFerr deleted the msc-3266-compliance branch April 23, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants