Align Synapse version string to use SYNAPSE_VERSION
#19011
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See matrix-org/synapse#12973 where we previously used
version_string="Synapse/" + get_distribution_version_string("matrix-synapse")
everywhere; and then updated to useversion_string=f"Synapse/{SYNAPSE_VERSION}"
for every other place exceptsynapse/app/homeserver.py
(why?!?!?!). This seems more like a typo than something on purpose especially without any context in the comments or PR. The whole point of that PR was trying to solve the missing git info in version strings.For reference, here is what both variables look like for me locally on the latest
develop
:SYNAPSE_VERSION
:1.139.0 (b=develop,1d2ddbc76e,dirty)
VERSION
:1.139.0
Only reason we may want to do this is to hide the branch name (some sensitive name that exposes a security fix, etc). But we don't hide anything:
https://matrix.org/_matrix/federation/v1/version
On
matrix.org
, theServer
response header is masked ascloudflare
which would otherwise show1.139.0rc3
for everything from the main process.This is spawning from looking at the way we setup and start Synapse for homeserver tenant provisioning in the Synapse Pro for Small Hosts project (https://github.com/element-hq/synapse-small-hosts/issues/221)
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.