-
Notifications
You must be signed in to change notification settings - Fork 525
1.142.0rc1 regression fix: Allow coercing a str to a FilePath in MasConfigModel
#19144
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix a bug introduced in 1.142.0rc1 where any attempt to configure `matrix_authentication_service.secret_path` would prevent the homeserver from starting up. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,13 @@ class ParseModel(BaseModel): | |
|
|
||
| but otherwise uses Pydantic's default behaviour. | ||
|
|
||
| Strict mode can adversely affect some types of fields, and should be disabled | ||
| for a field if: | ||
|
|
||
| - the field's type is a `Path` or `FilePath`. Strict mode will refuse to | ||
| coerce from `str` (likely what the yaml parser will produce) to `FilePath`, | ||
| raising a `ValidationError`. | ||
|
Comment on lines
+36
to
+38
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kinda feels like a bug with the May be worth finding existing issues tracking this or creating one.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can see both sides of the argument. On one hand, it would be a bit odd to allow coercion for one specific type ( So I agree that there's something either wrong/missing. I'll raise it as an issue in a bit while waiting for the release assets to build. |
||
|
|
||
| For now, ignore unknown fields. In the future, we could change this so that unknown | ||
| config values cause a ValidationError, provided the error messages are meaningful to | ||
| server operators. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was this problem caught?
Can we be sure it doesn't happen elsewhere? (feels like no without manually auditing things or test coverage to stress these pieces)
When having a cursory look, only this stood out to me,
synapse/synapse/config/matrixrtc.py
Lines 44 to 45 in 6790312
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I raised this after the CI for element-hq/ess-helm#853 started failing on RC3