Skip to content

Commit 8613f76

Browse files
committedDec 13, 2023
More renaming
1 parent 32447b0 commit 8613f76

24 files changed

+125
-126
lines changed
 

‎.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Automatically request reviews from the synapse-core team when a pull request comes in.
2-
* @matrix-org/synapse-core
2+
* @element-hq/synapse-core

‎.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
images: |
6060
docker.io/matrixdotorg/synapse
61-
ghcr.io/matrix-org/synapse
61+
ghcr.io/element-hq/synapse
6262
flavor: |
6363
latest=false
6464
tags: |

‎README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Alongside all that, join our developer community on Matrix:
237237
:alt: (Rendered documentation on GitHub Pages)
238238
:target: https://matrix-org.github.io/synapse/latest/
239239

240-
.. |license| image:: https://img.shields.io/github/license/matrix-org/synapse
240+
.. |license| image:: https://img.shields.io/github/license/element-hq/synapse
241241
:alt: (check license in LICENSE file)
242242
:target: LICENSE
243243

‎book.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ create-missing = false
1616

1717
[output.html]
1818
# The URL visitors will be directed to when they try to edit a page
19-
edit-url-template = "https://github.com/matrix-org/synapse/edit/develop/{path}"
19+
edit-url-template = "https://github.com/element-hq/synapse/edit/develop/{path}"
2020

2121
# Remove the numbers that appear before each item in the sidebar, as they can
2222
# get quite messy as we nest deeper
2323
no-section-label = true
2424

2525
# The source code URL of the repository
26-
git-repository-url = "https://github.com/matrix-org/synapse"
26+
git-repository-url = "https://github.com/element-hq/synapse"
2727

2828
# The path that the docs are hosted on
2929
site-url = "/synapse/"

‎contrib/workers-bash-scripts/create-multiple-stream-writers.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Creating multiple stream writers with a bash script
22

3-
This script creates multiple [stream writer](https://github.com/matrix-org/synapse/blob/develop/docs/workers.md#stream-writers) workers.
3+
This script creates multiple [stream writer](https://github.com/element-hq/synapse/blob/develop/docs/workers.md#stream-writers) workers.
44

55
Stream writers require both replication and HTTP listeners.
66

77
It also prints out the example lines for Synapse main configuration file.
88

99
Remember to route necessary endpoints directly to a worker associated with it.
1010

11-
If you run the script as-is, it will create workers with the replication listener starting from port 8034 and another, regular http listener starting from 8044. If you don't need all of the stream writers listed in the script, just remove them from the ```STREAM_WRITERS``` array.
11+
If you run the script as-is, it will create workers with the replication listener starting from port 8034 and another, regular http listener starting from 8044. If you don't need all of the stream writers listed in the script, just remove them from the ```STREAM_WRITERS``` array.
1212

1313
Hint: Note that `worker_pid_file` is required if `worker_daemonize` is `true`. Uncomment and/or modify the line if needed.
1414

@@ -71,7 +71,7 @@ cat << EXAMPLECONFIG
7171
# Don't forget to configure your reverse proxy and
7272
# necessary endpoints to their respective worker.
7373
74-
# See https://github.com/matrix-org/synapse/blob/develop/docs/workers.md
74+
# See https://github.com/element-hq/synapse/blob/develop/docs/workers.md
7575
# for more information.
7676
7777
# Remember: Under NO circumstances should the replication
@@ -102,7 +102,7 @@ You should receive an output similar to the following:
102102
# Don't forget to configure your reverse proxy and
103103
# necessary endpoints to their respective worker.
104104

105-
# See https://github.com/matrix-org/synapse/blob/develop/docs/workers.md
105+
# See https://github.com/element-hq/synapse/blob/develop/docs/workers.md
106106
# for more information
107107

108108
# Remember: Under NO circumstances should the replication
@@ -138,14 +138,14 @@ Simply copy-and-paste the output to an appropriate place in your Synapse main co
138138

139139
## Write directly to Synapse configuration file
140140

141-
You could also write the output directly to homeserver main configuration file. **This, however, is not recommended** as even a small typo (such as replacing >> with >) can erase the entire ```homeserver.yaml```.
141+
You could also write the output directly to homeserver main configuration file. **This, however, is not recommended** as even a small typo (such as replacing >> with >) can erase the entire ```homeserver.yaml```.
142142

143143
If you do this, back up your original configuration file first:
144144

145145
```console
146146
# Back up homeserver.yaml first
147-
cp /etc/matrix-synapse/homeserver.yaml /etc/matrix-synapse/homeserver.yaml.bak
147+
cp /etc/matrix-synapse/homeserver.yaml /etc/matrix-synapse/homeserver.yaml.bak
148148

149149
# Create workers and write output to your homeserver.yaml
150-
./create_stream_writers.sh >> /etc/matrix-synapse/homeserver.yaml
150+
./create_stream_writers.sh >> /etc/matrix-synapse/homeserver.yaml
151151
```

‎debian/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Build-Depends:
1818
python3-venv,
1919
tar,
2020
Standards-Version: 3.9.8
21-
Homepage: https://github.com/matrix-org/synapse
21+
Homepage: https://github.com/element-hq/synapse
2222

2323
Package: matrix-synapse-py3
2424
Architecture: any

‎debian/templates

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _Description: Name of the server:
55
servers via federation. This is normally the public hostname of the
66
server running synapse, but can be different if you set up delegation.
77
Please refer to the delegation documentation in this case:
8-
https://github.com/matrix-org/synapse/blob/master/docs/delegate.md.
8+
https://github.com/element-hq/synapse/blob/master/docs/delegate.md.
99

1010
Template: matrix-synapse/report-stats
1111
Type: boolean

‎docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ RUN --mount=type=cache,target=/synapse/target,sharing=locked \
161161
FROM docker.io/library/python:${PYTHON_VERSION}-slim-bookworm
162162

163163
LABEL org.opencontainers.image.url='https://matrix.org/docs/projects/server/synapse'
164-
LABEL org.opencontainers.image.documentation='https://github.com/matrix-org/synapse/blob/master/docker/README.md'
165-
LABEL org.opencontainers.image.source='https://github.com/matrix-org/synapse.git'
164+
LABEL org.opencontainers.image.documentation='https://github.com/element-hq/synapse/blob/master/docker/README.md'
165+
LABEL org.opencontainers.image.source='https://github.com/element-hq/synapse.git'
166166
LABEL org.opencontainers.image.licenses='Apache-2.0'
167167

168168
RUN \

‎docker/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The following environment variables are supported in `generate` mode:
7878

7979
## Postgres
8080

81-
By default the config will use SQLite. See the [docs on using Postgres](https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md) for more info on how to use Postgres. Until this section is improved [this issue](https://github.com/matrix-org/synapse/issues/8304) may provide useful information.
81+
By default the config will use SQLite. See the [docs on using Postgres](https://github.com/element-hq/synapse/blob/develop/docs/postgres.md) for more info on how to use Postgres. Until this section is improved [this issue](https://github.com/element-hq/synapse/issues/8304) may provide useful information.
8282

8383
## Running synapse
8484

@@ -151,7 +151,7 @@ is suitable for local testing, but for any practical use, you will either need
151151
to use a reverse proxy, or configure Synapse to expose an HTTPS port.
152152

153153
For documentation on using a reverse proxy, see
154-
https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.md.
154+
https://github.com/element.-hq/synapse/blob/master/docs/reverse_proxy.md.
155155

156156
For more information on enabling TLS support in synapse itself, see
157157
https://matrix-org.github.io/synapse/latest/setup/installation.html#tls-certificates. Of

‎docker/complement/Dockerfile

+47-47
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
# syntax=docker/dockerfile:1
2-
# This dockerfile builds on top of 'docker/Dockerfile-workers' in matrix-org/synapse
2+
# This dockerfile builds on top of 'docker/Dockerfile-workers' in element.-hq/synapse
33
# by including a built-in postgres instance, as well as setting up the homeserver so
44
# that it is ready for testing via Complement.
55
#
66
# Instructions for building this image from those it depends on is detailed in this guide:
7-
# https://github.com/matrix-org/synapse/blob/develop/docker/README-testing.md#testing-with-postgresql-and-single-or-multi-process-synapse
7+
# https://github.com/element.-hq/synapse/blob/develop/docker/README-testing.md#testing-with-postgresql-and-single-or-multi-process-synapse
88

99
ARG SYNAPSE_VERSION=latest
1010
# This is an intermediate image, to be built locally (not pulled from a registry).
1111
ARG FROM=matrixdotorg/synapse-workers:$SYNAPSE_VERSION
1212

1313
FROM $FROM
14-
# First of all, we copy postgres server from the official postgres image,
15-
# since for repeated rebuilds, this is much faster than apt installing
16-
# postgres each time.
17-
18-
# This trick only works because (a) the Synapse image happens to have all the
19-
# shared libraries that postgres wants, (b) we use a postgres image based on
20-
# the same debian version as Synapse's docker image (so the versions of the
21-
# shared libraries match).
22-
RUN adduser --system --uid 999 postgres --home /var/lib/postgresql
23-
COPY --from=docker.io/library/postgres:13-bookworm /usr/lib/postgresql /usr/lib/postgresql
24-
COPY --from=docker.io/library/postgres:13-bookworm /usr/share/postgresql /usr/share/postgresql
25-
RUN mkdir /var/run/postgresql && chown postgres /var/run/postgresql
26-
ENV PATH="${PATH}:/usr/lib/postgresql/13/bin"
27-
ENV PGDATA=/var/lib/postgresql/data
28-
29-
# We also initialize the database at build time, rather than runtime, so that it's faster to spin up the image.
30-
RUN gosu postgres initdb --locale=C --encoding=UTF-8 --auth-host password
31-
32-
# Configure a password and create a database for Synapse
33-
RUN echo "ALTER USER postgres PASSWORD 'somesecret'" | gosu postgres postgres --single
34-
RUN echo "CREATE DATABASE synapse" | gosu postgres postgres --single
35-
36-
# Extend the shared homeserver config to disable rate-limiting,
37-
# set Complement's static shared secret, enable registration, amongst other
38-
# tweaks to get Synapse ready for testing.
39-
# To do this, we copy the old template out of the way and then include it
40-
# with Jinja2.
41-
RUN mv /conf/shared.yaml.j2 /conf/shared-orig.yaml.j2
42-
COPY conf/workers-shared-extra.yaml.j2 /conf/shared.yaml.j2
43-
44-
WORKDIR /data
45-
46-
COPY conf/postgres.supervisord.conf /etc/supervisor/conf.d/postgres.conf
47-
48-
# Copy the entrypoint
49-
COPY conf/start_for_complement.sh /
50-
51-
# Expose nginx's listener ports
52-
EXPOSE 8008 8448
53-
54-
ENTRYPOINT ["/start_for_complement.sh"]
55-
56-
# Update the healthcheck to have a shorter check interval
57-
HEALTHCHECK --start-period=5s --interval=1s --timeout=1s \
58-
CMD /bin/sh /healthcheck.sh
14+
# First of all, we copy postgres server from the official postgres image,
15+
# since for repeated rebuilds, this is much faster than apt installing
16+
# postgres each time.
17+
18+
# This trick only works because (a) the Synapse image happens to have all the
19+
# shared libraries that postgres wants, (b) we use a postgres image based on
20+
# the same debian version as Synapse's docker image (so the versions of the
21+
# shared libraries match).
22+
RUN adduser --system --uid 999 postgres --home /var/lib/postgresql
23+
COPY --from=docker.io/library/postgres:13-bookworm /usr/lib/postgresql /usr/lib/postgresql
24+
COPY --from=docker.io/library/postgres:13-bookworm /usr/share/postgresql /usr/share/postgresql
25+
RUN mkdir /var/run/postgresql && chown postgres /var/run/postgresql
26+
ENV PATH="${PATH}:/usr/lib/postgresql/13/bin"
27+
ENV PGDATA=/var/lib/postgresql/data
28+
29+
# We also initialize the database at build time, rather than runtime, so that it's faster to spin up the image.
30+
RUN gosu postgres initdb --locale=C --encoding=UTF-8 --auth-host password
31+
32+
# Configure a password and create a database for Synapse
33+
RUN echo "ALTER USER postgres PASSWORD 'somesecret'" | gosu postgres postgres --single
34+
RUN echo "CREATE DATABASE synapse" | gosu postgres postgres --single
35+
36+
# Extend the shared homeserver config to disable rate-limiting,
37+
# set Complement's static shared secret, enable registration, amongst other
38+
# tweaks to get Synapse ready for testing.
39+
# To do this, we copy the old template out of the way and then include it
40+
# with Jinja2.
41+
RUN mv /conf/shared.yaml.j2 /conf/shared-orig.yaml.j2
42+
COPY conf/workers-shared-extra.yaml.j2 /conf/shared.yaml.j2
43+
44+
WORKDIR /data
45+
46+
COPY conf/postgres.supervisord.conf /etc/supervisor/conf.d/postgres.conf
47+
48+
# Copy the entrypoint
49+
COPY conf/start_for_complement.sh /
50+
51+
# Expose nginx's listener ports
52+
EXPOSE 8008 8448
53+
54+
ENTRYPOINT ["/start_for_complement.sh"]
55+
56+
# Update the healthcheck to have a shorter check interval
57+
HEALTHCHECK --start-period=5s --interval=1s --timeout=1s \
58+
CMD /bin/sh /healthcheck.sh

‎docs/consent_tracking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To enable this, first create templates for the policy and success pages.
2424
These should be stored on the local filesystem.
2525

2626
These templates use the [Jinja2](http://jinja.pocoo.org) templating language,
27-
and [docs/privacy_policy_templates](https://github.com/matrix-org/synapse/tree/develop/docs/privacy_policy_templates/)
27+
and [docs/privacy_policy_templates](https://github.com/element.-hq/synapse/tree/develop/docs/privacy_policy_templates/)
2828
gives examples of the sort of thing that can be done.
2929

3030
Note that the templates must be stored under a name giving the language of the

‎docs/development/git.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ b2dba0607`:
1414
Note how the commit comment explains clearly what is changing and why. Also
1515
note the *absence* of merge commits, as well as the absence of commits called
1616
things like (to pick a few culprits):
17-
[“pep8”](https://github.com/matrix-org/synapse/commit/84691da6c), [“fix broken
18-
test”](https://github.com/matrix-org/synapse/commit/474810d9d),
19-
[“oops”](https://github.com/matrix-org/synapse/commit/c9d72e457),
20-
[“typo”](https://github.com/matrix-org/synapse/commit/836358823), or [“Who's
21-
the president?”](https://github.com/matrix-org/synapse/commit/707374d5d).
17+
[“pep8”](https://github.com/element.-hq/synapse/commit/84691da6c), [“fix broken
18+
test”](https://github.com/element.-hq/synapse/commit/474810d9d),
19+
[“oops”](https://github.com/element.-hq/synapse/commit/c9d72e457),
20+
[“typo”](https://github.com/element.-hq/synapse/commit/836358823), or [“Who's
21+
the president?”](https://github.com/element.-hq/synapse/commit/707374d5d).
2222

2323
There are a number of reasons why keeping a clean commit history is a good
2424
thing:

‎docs/development/synapse_architecture/streams.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Streams
22

33
Synapse has a concept of "streams", which are roughly described in [`id_generators.py`](
4-
https://github.com/matrix-org/synapse/blob/develop/synapse/storage/util/id_generators.py
4+
https://github.com/element.-hq/synapse/blob/develop/synapse/storage/util/id_generators.py
55
).
66
Generally speaking, streams are a series of notifications that something in Synapse's database has changed that the application might need to respond to.
77
For example:
@@ -11,12 +11,12 @@ For example:
1111
- The to-device stream reports when a device has a new [to-device message](https://spec.matrix.org/v1.7/client-server-api/#send-to-device-messaging).
1212

1313
See [`synapse.replication.tcp.streams`](
14-
https://github.com/matrix-org/synapse/blob/develop/synapse/replication/tcp/streams/__init__.py
14+
https://github.com/element.-hq/synapse/blob/develop/synapse/replication/tcp/streams/__init__.py
1515
) for the full list of streams.
1616

1717
It is very helpful to understand the streams mechanism when working on any part of Synapse that needs to respond to changes—especially if those changes are made by different workers.
1818
To that end, let's describe streams formally, paraphrasing from the docstring of [`AbstractStreamIdGenerator`](
19-
https://github.com/matrix-org/synapse/blob/a719b703d9bd0dade2565ddcad0e2f3a7a9d4c37/synapse/storage/util/id_generators.py#L96
19+
https://github.com/element.-hq/synapse/blob/a719b703d9bd0dade2565ddcad0e2f3a7a9d4c37/synapse/storage/util/id_generators.py#L96
2020
).
2121

2222
### Definition

‎docs/metrics-howto.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787

8888
1. Restart Prometheus.
8989

90-
1. Consider using the [grafana dashboard](https://github.com/matrix-org/synapse/tree/master/contrib/grafana/)
91-
and required [recording rules](https://github.com/matrix-org/synapse/tree/master/contrib/prometheus/)
90+
1. Consider using the [grafana dashboard](https://github.com/element.-hq/synapse/tree/master/contrib/grafana/)
91+
and required [recording rules](https://github.com/element.-hq/synapse/tree/master/contrib/prometheus/)
9292

9393
## Monitoring workers
9494

‎docs/modules/writing_a_module.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ either the output of the module's `parse_config` static method (see below), or t
1010
configuration associated with the module in Synapse's configuration file.
1111

1212
See the documentation for the `ModuleApi` class
13-
[here](https://github.com/matrix-org/synapse/blob/master/synapse/module_api/__init__.py).
13+
[here](https://github.com/element.-hq/synapse/blob/master/synapse/module_api/__init__.py).
1414

1515
## When Synapse runs with several modules configured
1616

@@ -109,7 +109,7 @@ from synapse.module_api import cached, ModuleApi
109109
class MyModule:
110110
def __init__(self, config: Any, api: ModuleApi):
111111
self.api = api
112-
112+
113113
# Register the cached function so Synapse knows how to correctly invalidate
114114
# entries for it.
115115
self.api.register_cached_function(self.get_user_from_id)
@@ -124,15 +124,15 @@ class MyModule:
124124

125125
async def do_something_with_users(self) -> None:
126126
"""Calls the cached function and then invalidates an entry in its cache."""
127-
127+
128128
user_id = "@alice:example.com"
129-
129+
130130
# Get the user. Since get_department_for_user is wrapped with a cache,
131131
# the return value for this user_id will be cached.
132132
department = await self.get_department_for_user(user_id)
133-
133+
134134
# Do something with `department`...
135-
135+
136136
# Let's say something has changed with our user, and the entry we have for
137137
# them in the cache is out of date, so we want to invalidate it.
138138
await self.api.invalidate_cache(self.get_department_for_user, (user_id,))

‎docs/sso_mapping_providers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ A custom mapping provider must specify the following methods:
115115

116116
Synapse has a built-in OpenID mapping provider if a custom provider isn't
117117
specified in the config. It is located at
118-
[`synapse.handlers.oidc.JinjaOidcMappingProvider`](https://github.com/matrix-org/synapse/blob/develop/synapse/handlers/oidc.py).
118+
[`synapse.handlers.oidc.JinjaOidcMappingProvider`](https://github.com/element.-hq/synapse/blob/develop/synapse/handlers/oidc.py).
119119

120120
## SAML Mapping Providers
121121

@@ -202,4 +202,4 @@ A custom mapping provider must specify the following methods:
202202

203203
Synapse has a built-in SAML mapping provider if a custom provider isn't
204204
specified in the config. It is located at
205-
[`synapse.handlers.saml.DefaultSamlMappingProvider`](https://github.com/matrix-org/synapse/blob/develop/synapse/handlers/saml.py).
205+
[`synapse.handlers.saml.DefaultSamlMappingProvider`](https://github.com/element.-hq/synapse/blob/develop/synapse/handlers/saml.py).

0 commit comments

Comments
 (0)
Please sign in to comment.