Skip to content

Conversation

V02460
Copy link
Contributor

@V02460 V02460 commented Aug 6, 2025

Support passing multiple config files to register_new_matrix_user. Before, all but the last config file were silently ignored.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@V02460 V02460 requested a review from a team as a code owner August 6, 2025 09:22
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.

Thanks for tackling this, and sorry for the slow feedback on review.

This looks good to me, other than one small thing below!

Comment on lines +332 to +333
err = "File %r is empty or doesn't parse into a key-value map. IGNORING."
print(err % (config_file,))
Copy link
Member

Choose a reason for hiding this comment

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

Despite Synapse doing this, I think we should raise an error here instead of letting the user go through. Else an action may be carried out that the user didn't intend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can’t follow you here. Could you give an example on how that would lead to unintended action?

This suggestion would complicate documenting calls to register_matrix_user in case the config files are auto-generated and possibly empty. Another point is that different behavior between the Synapse CLIs is confusing (and one reason this PR exists).

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.

2 participants