Skip to content

Allow a few admin APIs used by MAS to run on workers #18313

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

Merged
merged 14 commits into from
May 2, 2025

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Apr 4, 2025

This should be reviewed commit by commit.

It adds a few admin servlets that are used by MAS when in delegation mode to workers

This is lacking documentation, but we need this for the m.org migration

@sandhose sandhose requested a review from a team as a code owner April 4, 2025 14:39
@sandhose sandhose force-pushed the quenting/morg-mas-fixes branch from 4a6639b to 03d716e Compare April 6, 2025 16:10
Comment on lines 58 to 59
# If the device_handler is None, then password changing is disabled.
if self._device_handler is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

no problem for a rollout, but for merging to mainline I worry if clarity suffers a bit with this indirection? but should think about it later

Copy link
Member

Choose a reason for hiding this comment

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

Ah - I see why this was done.
We could go back to the previous check on can_change_password but then we still need to deal with checking if _device_handler is None.

Maybe it's better to combine the two?
ie.

if not self._auth_handler.can_change_password() or self._device_handler is None:

That would keep the clarity here and negate the need for the comment.

Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did something like that in fcccca4

@sandhose sandhose requested a review from a team April 15, 2025 09:44
@sandhose sandhose requested a review from devonh April 15, 2025 15:47
@sandhose sandhose force-pushed the quenting/morg-mas-fixes branch from c5cd804 to ccd3b30 Compare May 2, 2025 10:32
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Some minor, non-blocking points. Otherwise LGTM.

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Oh, and can you update the worker documentation with the newly-allowed endpoints, please?

@sandhose sandhose requested a review from anoadragon453 May 2, 2025 11:33
@github-actions github-actions bot deployed to PR Documentation Preview May 2, 2025 11:34 Active
@sandhose sandhose force-pushed the quenting/morg-mas-fixes branch from c46853a to 842b8cf Compare May 2, 2025 12:12
@github-actions github-actions bot deployed to PR Documentation Preview May 2, 2025 12:13 Active
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Note we typically don't force-push post review, as otherwise it's difficult to see what's changed.

@sandhose sandhose merged commit b8146d4 into develop May 2, 2025
41 checks passed
@sandhose sandhose deleted the quenting/morg-mas-fixes branch May 2, 2025 13:38
MatMaul pushed a commit to tchapgouv/synapse that referenced this pull request May 12, 2025
This should be reviewed commit by commit.

It adds a few admin servlets that are used by MAS when in delegation
mode to workers

---------

Co-authored-by: Olivier 'reivilibre <[email protected]>
Co-authored-by: Devon Hudson <[email protected]>
Co-authored-by: Andrew Morgan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants