-
Notifications
You must be signed in to change notification settings - Fork 6
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
Prevent updating matrix-auth data more than once #670
Conversation
Test coverage for 690d295
Static code analysis report
|
Out of curiosity, why was it emitted several times? |
The update_matrix_auth_integration is called during the reconcile here. There was a method in the charm for checking if homeserver or registration changed but by mistake was checking for the key "shared_secret" which doesn't exist so it was updating every time. Since these values are not supposed to be changed during a Synapse instance lifetime I moved the check to the library. The relation data is only updated if there is an ValueError (relation empty or invalid) now. |
* Prevent updating matrix-auth data more than once * Update matrix_auth.py --------- Co-authored-by: javierdelapuente <[email protected]>
* Prevent updating matrix-auth data more than once * Update matrix_auth.py --------- Co-authored-by: javierdelapuente <[email protected]>
Overview
This PR changes the way that matrix-auth library updates relation data by preventing to do it more than once. This way, relation-change events are not emitted for no reason and the encryption key secret is not changed.
Rationale
Prevent changes in relation data.
Juju Events Changes
Module Changes
Library Changes
Checklist
src-docs
urgent
,trivial
,complex
)