Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove code generating comments in configuration file #12941

Merged
merged 54 commits into from
Jun 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b788ea8
add info about config documentation to file header
H-Shay May 18, 2022
370a36b
remove comments from api.py
H-Shay May 18, 2022
74e171b
remove comments from appservice.py
H-Shay May 18, 2022
9fce9af
remove comments from auth.py
H-Shay May 18, 2022
c8ebd3e
remove comments from background_updates.py
H-Shay May 18, 2022
e17b3e5
remove comments from cache.py
H-Shay May 18, 2022
bf7c543
remove comments from captcha.py
H-Shay May 18, 2022
6d30891
remove comments from cas.py
H-Shay May 18, 2022
ad320d3
remove comments from consent.py
H-Shay May 18, 2022
d67d26b
remove comments from database.py
H-Shay May 18, 2022
91bd93d
remove comments from emailconfig.py
H-Shay May 18, 2022
7957222
remove comments from federation.py
H-Shay May 18, 2022
f6e29de
remove comments from federation.py
H-Shay May 18, 2022
004e2ae
remove comments from groups.py
H-Shay May 18, 2022
650332c
remove comments from jwt.py
H-Shay May 18, 2022
b246258
remove comments from modules.py
H-Shay May 19, 2022
11d9f22
remove comments from oembed.py
H-Shay May 19, 2022
9e47700
remove comments from oidc.py
H-Shay May 19, 2022
ee3c658
remove comments from push.py
H-Shay May 19, 2022
6b1cfc3
remove comments from ratelimiting.py
H-Shay May 19, 2022
6babef8
remove comments from redis.py
H-Shay May 19, 2022
22cd3d8
remove comments from retention.py
H-Shay May 19, 2022
29a9e2f
remove comments from room.py
H-Shay May 19, 2022
b449597
remove comments in room_directory.py
H-Shay May 19, 2022
9647714
remove comments from saml2.py
H-Shay May 19, 2022
e090c1e
remove comments from server_notices.py
H-Shay May 19, 2022
b8f32fa
remvoe comments from sso.py
H-Shay May 19, 2022
b6393d4
remove comments from stats.py
H-Shay May 19, 2022
bbce92b
remove comments from tracer.py
H-Shay May 19, 2022
099f79f
remove comments from user_directory.py
H-Shay May 19, 2022
01b88e0
remove comments from voip.py
H-Shay May 19, 2022
b2d0418
remove comments from workers.py
H-Shay May 19, 2022
bb88cc1
remove comments from repository.py
H-Shay May 19, 2022
e797906
remove comments from registration.py
H-Shay May 19, 2022
a925e0e
remove comments from tls.py
H-Shay May 19, 2022
bb52e28
remove comments from server.py
H-Shay May 19, 2022
b97a3e7
remove comments from metrics.py
H-Shay May 19, 2022
e01e1d4
update sample_config_header
H-Shay May 19, 2022
65ff8a0
slight refactor to generate whole config from parts
H-Shay May 31, 2022
60bbdbd
sample config
H-Shay May 31, 2022
2c1211f
remove comments from logger.py
H-Shay May 31, 2022
c66db44
remove comments from key.py
H-Shay May 31, 2022
0925fd3
merge in develop
H-Shay May 31, 2022
573b399
changelog
H-Shay Jun 1, 2022
210e8b1
lint + proper changelog number
H-Shay Jun 1, 2022
408c45e
regenerate sample config
H-Shay Jun 1, 2022
10d2613
remove printed shared secret from tests where unnecessary
H-Shay Jun 1, 2022
04881af
fix issue with registration shared secret not being string
H-Shay Jun 1, 2022
f5b16c1
requested changes
H-Shay Jun 7, 2022
18d7a87
regenerate config
H-Shay Jun 7, 2022
40cbc96
requested changes
H-Shay Jun 9, 2022
bb1b2bb
actually requested change
H-Shay Jun 9, 2022
ffb8f2b
regenerate sample config
H-Shay Jun 9, 2022
2348e47
Merge branch 'develop' into shay/bye_bye_comments
H-Shay Jun 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 1 addition & 42 deletions synapse/config/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,46 +73,5 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
def generate_config_section(
self, report_stats: Optional[bool] = None, **kwargs: Any
) -> str:
res = """\
## Metrics ###

# Enable collection and rendering of performance metrics
#
#enable_metrics: false

# Enable sentry integration
# NOTE: While attempts are made to ensure that the logs don't contain
# any sensitive information, this cannot be guaranteed. By enabling
# this option the sentry server may therefore receive sensitive
# information, and it in turn may then diseminate sensitive information
# through insecure notification channels if so configured.
#
#sentry:
# dsn: "..."

# Flags to enable Prometheus metrics which are not suitable to be
# enabled by default, either for performance reasons or limited use.
#
metrics_flags:
# Publish synapse_federation_known_servers, a gauge of the number of
# servers this homeserver knows about, including itself. May cause
# performance problems on large homeservers.
#
#known_servers: true

# Whether or not to report anonymized homeserver usage statistics.
#
"""

if report_stats is None:
res += "#report_stats: true|false\n"
else:
res += "report_stats: %s\n" % ("true" if report_stats else "false")

res += """
# The endpoint to report the anonymized homeserver usage statistics to.
# Defaults to https://matrix.org/report-usage-stats/push
#
#report_stats_endpoint: https://example.com/report-usage-stats/push
"""
res = "report_stats: %s\n" % ("true" if report_stats else "false")
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
return res