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

Cap the version of prometheus_client to <v0.9.0 in the dockerfile #8767

Merged
merged 4 commits into from Nov 17, 2020

Conversation

anoadragon453
Copy link
Member

Fixes #8766

@anoadragon453 anoadragon453 requested a review from a team November 16, 2020 19:33
docker/Dockerfile Outdated Show resolved Hide resolved
@clokep
Copy link
Contributor

clokep commented Nov 16, 2020

We do some magic to get "old deps" for CI:

synapse/tox.ini

Lines 87 to 90 in 3dc1871

# Make all greater-thans equals so we test the oldest version of our direct
# dependencies, but make the pyopenssl 17.0, which can work against an
# OpenSSL 1.1 compiled cryptography (as older ones don't compile on Travis).
/bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "s/psycopg2==2.6//" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs -d"\n" pip install'
, we could probably do something similar here.

@richvdh
Copy link
Member

richvdh commented Nov 16, 2020

It might be better just to rip out the offending line altogether. It's just an optimisation to speed up rebuilds (It was introduced in https://github.com/matrix-org/synapse/pull/7839/files, ftr)

@anoadragon453
Copy link
Member Author

We could rip out this specific dependency yes, however this may still happen with one of the other dependencies in there in the future.

@richvdh
Copy link
Member

richvdh commented Nov 17, 2020

We could rip out this specific dependency yes, however this may still happen with one of the other dependencies in there in the future.

Indeed. Best to have as few as possible in there. Anyway, most of the other listed dependencies don't have maximum version constraints.

@anoadragon453
Copy link
Member Author

I was seeing if we could fix this in a slightly smarter way. I noticed that when using a virtual environment, pip will do the right thing when being told to install a module with a version constraint, which is to downgrade the module if it's outside of those constraints:

(bla) ➜  synapse git:(develop) ✗ pip install prometheus-client
Collecting prometheus-client
  Using cached prometheus_client-0.9.0-py2.py3-none-any.whl (53 kB)
Installing collected packages: prometheus-client
Successfully installed prometheus-client-0.9.0
(bla) ➜  synapse git:(develop) ✗ pip install "prometheus-client<0.9.0"
Collecting prometheus-client<0.9.0
  Using cached prometheus_client-0.8.0-py2.py3-none-any.whl (53 kB)
Installing collected packages: prometheus-client
  Attempting uninstall: prometheus-client
    Found existing installation: prometheus-client 0.9.0
    Uninstalling prometheus-client-0.9.0:
      Successfully uninstalled prometheus-client-0.9.0
Successfully installed prometheus-client-0.8.0
(bla) ➜  synapse git:(develop) ✗

However, when using pip with the --prefix option (as we do in the dockerfile), this convenience is not the case:

➜  synapse git:(develop) ✗ pip install --prefix="$PWD/asd" "prometheus-client"                                             
Collecting prometheus-client
  Using cached https://files.pythonhosted.org/packages/f4/7e/ef341c67ed43ad2e39633a35c28b77bc555f9572f4df4fee11c2b467db00/prometheus_client-0.9.0-py2.py3-none-any.whl
Installing collected packages: prometheus-client
Successfully installed prometheus-client-0.9.0
➜  synapse git:(develop) ✗ pip install --prefix="$PWD/asd" "prometheus-client<0.9.0"
Collecting prometheus-client<0.9.0
  Using cached https://files.pythonhosted.org/packages/3f/0e/554a265ffdc56e1494ef08e18f765b0cdec78797f510c58c45cf37abb4f4/prometheus_client-0.8.0-py2.py3-none-any.whl
Installing collected packages: prometheus-client
Successfully installed prometheus-client-0.9.0
➜  synapse git:(develop) ✗ 

I'm not sure what the cause of the difference is. If there's some magic command line options that we can pass to pip to have it replicate this functionality for prefixes, then that would be the most elegant solution IMO.

@anoadragon453
Copy link
Member Author

It might be better just to rip out the offending line altogether.

I think capping the versions may be the best short-term approach as it keeps the performance gains while also providing the quick-fix?

@anoadragon453 anoadragon453 changed the base branch from develop to release-v1.23.0 November 17, 2020 13:40
@anoadragon453
Copy link
Member Author

Rebased to the release-v1.23.0 branch in order to not break that release's docker builds.

@anoadragon453 anoadragon453 requested a review from a team November 17, 2020 13:41
@anoadragon453
Copy link
Member Author

I can confirm this does fix the builds:

logs
(env) ➜  synapse git:(anoa/prometheus_client_docker) ✗ docker build -t asd -f docker/Dockerfile .                            
Sending build context to Docker daemon  6.223MB
Step 1/17 : ARG PYTHON_VERSION=3.8
Step 2/17 : FROM docker.io/python:${PYTHON_VERSION}-slim as builder
 ---> 41dcfe21e8fd
Step 3/17 : RUN apt-get update && apt-get install -y     build-essential     libffi-dev     libjpeg-dev     libpq-dev     libssl-dev     libwebp-dev     libxml++2.6-dev     libxslt1-dev     zlib1g-dev  && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> eb8e5887fb73
Step 4/17 : RUN pip install --prefix="/install" --no-warn-script-location         frozendict         jaeger-client         opentracing         "prometheus_client>=0.4.0,<0.9.0"         psycopg2         pycparser         pyrsistent         pyyaml         simplejson         threadloop         thrift
 ---> Running in 1fb776b55af0
Collecting frozendict
  Downloading frozendict-1.2.tar.gz (2.6 kB)
Collecting jaeger-client
  Downloading jaeger-client-4.3.0.tar.gz (81 kB)
Collecting opentracing
  Downloading opentracing-2.3.0.tar.gz (48 kB)
Collecting prometheus_client<0.9.0,>=0.4.0
  Downloading prometheus_client-0.8.0-py2.py3-none-any.whl (53 kB)
Collecting psycopg2
  Downloading psycopg2-2.8.6.tar.gz (383 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting pyrsistent
  Downloading pyrsistent-0.17.3.tar.gz (106 kB)
Collecting pyyaml
  Downloading PyYAML-5.3.1.tar.gz (269 kB)
Collecting simplejson
  Downloading simplejson-3.17.2-cp38-cp38-manylinux2010_x86_64.whl (137 kB)
Collecting threadloop
  Downloading threadloop-1.0.2.tar.gz (4.9 kB)
Collecting thrift
  Downloading thrift-0.13.0.tar.gz (59 kB)
Collecting tornado>=4.3
  Downloading tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl (427 kB)
Collecting six>=1.7.2
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Building wheels for collected packages: frozendict, jaeger-client, opentracing, psycopg2, pyrsistent, pyyaml, threadloop, thrift
  Building wheel for frozendict (setup.py): started
  Building wheel for frozendict (setup.py): finished with status 'done'
  Created wheel for frozendict: filename=frozendict-1.2-py3-none-any.whl size=3148 sha256=df5a70eb3029e1dcb6b8478068cb716a3ae7c026782b8f55f52d5a3fdadb8031
  Stored in directory: /root/.cache/pip/wheels/9b/9b/56/5713233cf7226423ab6c58c08081551a301b5863e343ba053c
  Building wheel for jaeger-client (setup.py): started
  Building wheel for jaeger-client (setup.py): finished with status 'done'
  Created wheel for jaeger-client: filename=jaeger_client-4.3.0-py3-none-any.whl size=64290 sha256=206b546dc69eb2b7e39ef65b914004c436fe1f57b64c1cafa29b160ca0e87406
  Stored in directory: /root/.cache/pip/wheels/ef/67/cc/1e96fd3ac7a245e8115eb2fe99f57a01699127e0ee212e4e1d
  Building wheel for opentracing (setup.py): started
  Building wheel for opentracing (setup.py): finished with status 'done'
  Created wheel for opentracing: filename=opentracing-2.3.0-py3-none-any.whl size=51346 sha256=20a99fb531f5e887b7a2c6e3ac5e1c8b1e137f67baf6b26d4172b2cb8a132c3e
  Stored in directory: /root/.cache/pip/wheels/d8/59/32/28a68fc65ba428fce889c46994767b2e4d000ee81e2ae47512
  Building wheel for psycopg2 (setup.py): started
  Building wheel for psycopg2 (setup.py): finished with status 'done'
  Created wheel for psycopg2: filename=psycopg2-2.8.6-cp38-cp38-linux_x86_64.whl size=143886 sha256=3e42fbd129079e6d301598ebe51c18b5e91ab698ad7d181bed643cf3a1cb35a4
  Stored in directory: /root/.cache/pip/wheels/70/5e/69/8a020d78c09043156a7df0b64529e460fbd922ca065c4b795c
  Building wheel for pyrsistent (setup.py): started
  Building wheel for pyrsistent (setup.py): finished with status 'done'
  Created wheel for pyrsistent: filename=pyrsistent-0.17.3-cp38-cp38-linux_x86_64.whl size=72524 sha256=a17968b17288f7676faec35977574ac5ac1522edb246852887f11e6790c36eba
  Stored in directory: /root/.cache/pip/wheels/3d/22/08/7042eb6309c650c7b53615d5df5cc61f1ea9680e7edd3a08d2
  Building wheel for pyyaml (setup.py): started
  Building wheel for pyyaml (setup.py): finished with status 'done'
  Created wheel for pyyaml: filename=PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl size=44619 sha256=b8cc42e64eb5df36190d9b4407fb583934872fd4dacdf39df9573cce6c274d6f
  Stored in directory: /root/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c
  Building wheel for threadloop (setup.py): started
  Building wheel for threadloop (setup.py): finished with status 'done'
  Created wheel for threadloop: filename=threadloop-1.0.2-py3-none-any.whl size=3425 sha256=6bcdf92f9898cb19ab6dfeacb857605e95628b9b6dff8ac6364c4a5e93b52b47
  Stored in directory: /root/.cache/pip/wheels/45/b4/e0/10a61e44f3381ae9f0454997f045d5695d92399e5e498380d4
  Building wheel for thrift (setup.py): started
  Building wheel for thrift (setup.py): finished with status 'done'
  Created wheel for thrift: filename=thrift-0.13.0-cp38-cp38-linux_x86_64.whl size=184390 sha256=61c1c8cd530ffad2dd29554a6ec9b3633332132acea4da7524db73d34fd05a70
  Stored in directory: /root/.cache/pip/wheels/0a/52/7e/8054b57725b8f2b9ddbaacb81b271b939681cc03f8231e6ebc
Successfully built frozendict jaeger-client opentracing psycopg2 pyrsistent pyyaml threadloop thrift
Installing collected packages: frozendict, tornado, threadloop, six, thrift, opentracing, jaeger-client, prometheus-client, psycopg2, pycparser, pyrsistent, pyyaml, simplejson
Successfully installed frozendict-1.2 jaeger-client-4.3.0 opentracing-2.3.0 prometheus-client-0.8.0 psycopg2-2.8.6 pycparser-2.20 pyrsistent-0.17.3 pyyaml-5.3.1 simplejson-3.17.2 six-1.15.0 threadloop-1.0.2 thrift-0.13.0 tornado-6.1
Removing intermediate container 1fb776b55af0
 ---> 1d8742451b7d
Step 5/17 : COPY synapse /synapse/synapse/
 ---> 8870cc55b77f
Step 6/17 : COPY scripts /synapse/scripts/
 ---> 1cc61267c5a0
Step 7/17 : COPY MANIFEST.in README.rst setup.py synctl /synapse/
 ---> ebf88e93a75a
Step 8/17 : RUN pip install --prefix="/install" --no-warn-script-location         /synapse[all]
 ---> Running in 49cddaf4df09
Processing /synapse
Collecting jsonschema>=2.5.1
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Processing /root/.cache/pip/wheels/9b/9b/56/5713233cf7226423ab6c58c08081551a301b5863e343ba053c/frozendict-1.2-py3-none-any.whl
Collecting unpaddedbase64>=1.1.0
  Downloading unpaddedbase64-1.1.0-py2.py3-none-any.whl (3.3 kB)
Collecting canonicaljson>=1.4.0
  Downloading canonicaljson-1.4.0-py3-none-any.whl (7.5 kB)
Collecting signedjson>=1.1.0
  Downloading signedjson-1.1.1.tar.gz (10 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting pynacl>=1.2.1
  Downloading PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
Collecting idna>=2.5
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting service_identity>=18.1.0
  Downloading service_identity-18.1.0-py2.py3-none-any.whl (11 kB)
Collecting Twisted>=18.9.0
  Downloading Twisted-20.3.0.tar.bz2 (3.1 MB)
Collecting treq>=15.1
  Downloading treq-20.9.0-py2.py3-none-any.whl (56 kB)
Collecting pyopenssl>=16.0.0
  Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
Processing /root/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c/PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl
Collecting pyasn1>=0.1.9
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pyasn1-modules>=0.0.7
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting bcrypt>=3.1.0
  Downloading bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl (63 kB)
Collecting pillow>=4.3.0
  Downloading Pillow-8.0.1-cp38-cp38-manylinux1_x86_64.whl (2.2 MB)
Collecting sortedcontainers>=1.4.4
  Downloading sortedcontainers-2.3.0-py2.py3-none-any.whl (29 kB)
Collecting pymacaroons>=0.13.0
  Downloading pymacaroons-0.13.0-py2.py3-none-any.whl (19 kB)
Collecting msgpack>=0.5.2
  Downloading msgpack-1.0.0-cp38-cp38-manylinux1_x86_64.whl (303 kB)
Collecting phonenumbers>=8.2.0
  Downloading phonenumbers-8.12.13-py2.py3-none-any.whl (2.6 MB)
Collecting prometheus_client<0.9.0,>=0.4.0
  Using cached prometheus_client-0.8.0-py2.py3-none-any.whl (53 kB)
Collecting attrs>=19.1.0
  Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting netaddr>=0.7.18
  Downloading netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)
Collecting Jinja2>=2.9
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting bleach>=1.4.3
  Downloading bleach-3.2.1-py2.py3-none-any.whl (145 kB)
Collecting typing-extensions>=3.7.4
  Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting sentry-sdk>=0.7.2
  Downloading sentry_sdk-0.19.3-py2.py3-none-any.whl (128 kB)
Collecting hiredis
  Downloading hiredis-1.1.0-cp38-cp38-manylinux2010_x86_64.whl (62 kB)
Processing /root/.cache/pip/wheels/ef/67/cc/1e96fd3ac7a245e8115eb2fe99f57a01699127e0ee212e4e1d/jaeger_client-4.3.0-py3-none-any.whl
Collecting lxml>=3.5.0
  Downloading lxml-4.6.1-cp38-cp38-manylinux1_x86_64.whl (5.4 MB)
Collecting matrix-synapse-ldap3>=0.1
  Downloading matrix-synapse-ldap3-0.1.4.tar.gz (12 kB)
Collecting pysaml2>=4.5.0
  Downloading pysaml2-6.3.1-py2.py3-none-any.whl (338 kB)
Processing /root/.cache/pip/wheels/d8/59/32/28a68fc65ba428fce889c46994767b2e4d000ee81e2ae47512/opentracing-2.3.0-py3-none-any.whl
Collecting txacme>=0.9.2
  Downloading txacme-0.9.3-py2.py3-none-any.whl (61 kB)
Collecting txredisapi>=1.4.7
  Downloading txredisapi-1.4.7-py3-none-any.whl (24 kB)
Collecting authlib>=0.14.0
  Downloading Authlib-0.15.2-py2.py3-none-any.whl (203 kB)
Processing /root/.cache/pip/wheels/70/5e/69/8a020d78c09043156a7df0b64529e460fbd922ca065c4b795c/psycopg2-2.8.6-cp38-cp38-linux_x86_64.whl
Collecting pyjwt>=1.6.4
  Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/site-packages (from jsonschema>=2.5.1->matrix-synapse==1.23.0rc1) (50.3.2)
Processing /root/.cache/pip/wheels/3d/22/08/7042eb6309c650c7b53615d5df5cc61f1ea9680e7edd3a08d2/pyrsistent-0.17.3-cp38-cp38-linux_x86_64.whl
Collecting six>=1.11.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting simplejson>=3.14.0
  Using cached simplejson-3.17.2-cp38-cp38-manylinux2010_x86_64.whl (137 kB)
Collecting importlib-metadata
  Downloading importlib_metadata-2.0.0-py2.py3-none-any.whl (31 kB)
Collecting cffi>=1.4.1
  Downloading cffi-1.14.3-cp38-cp38-manylinux1_x86_64.whl (410 kB)
Collecting cryptography
  Downloading cryptography-3.2.1-cp35-abi3-manylinux2010_x86_64.whl (2.6 MB)
Collecting zope.interface>=4.4.2
  Downloading zope.interface-5.2.0-cp38-cp38-manylinux2010_x86_64.whl (244 kB)
Collecting constantly>=15.1
  Downloading constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting incremental>=16.10.1
  Using cached incremental-17.5.0-py2.py3-none-any.whl (16 kB)
Collecting Automat>=0.3.0
  Downloading Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting hyperlink>=17.1.1
  Downloading hyperlink-20.0.1-py2.py3-none-any.whl (48 kB)
Collecting PyHamcrest!=1.10.0,>=1.9.0
  Downloading PyHamcrest-2.0.2-py3-none-any.whl (52 kB)
Collecting requests>=2.1.0
  Downloading requests-2.25.0-py2.py3-none-any.whl (61 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl (32 kB)
Collecting packaging
  Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting urllib3>=1.10.0
  Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Collecting certifi
  Downloading certifi-2020.11.8-py2.py3-none-any.whl (155 kB)
Processing /root/.cache/pip/wheels/0a/52/7e/8054b57725b8f2b9ddbaacb81b271b939681cc03f8231e6ebc/thrift-0.13.0-cp38-cp38-linux_x86_64.whl
Processing /root/.cache/pip/wheels/45/b4/e0/10a61e44f3381ae9f0454997f045d5695d92399e5e498380d4/threadloop-1.0.2-py3-none-any.whl
Collecting tornado>=4.3
  Using cached tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl (427 kB)
Collecting ldap3>=2.6
  Downloading ldap3-2.8.1-py2.py3-none-any.whl (423 kB)
Collecting pytz
  Downloading pytz-2020.4-py2.py3-none-any.whl (509 kB)
Collecting python-dateutil
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting defusedxml
  Downloading defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Collecting txsni
  Downloading TxSNI-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting acme<1.0.0,>=0.21.0
  Downloading acme-0.40.1-py2.py3-none-any.whl (86 kB)
Collecting pem>=16.1.0
  Downloading pem-20.1.0-py2.py3-none-any.whl (8.5 kB)
Collecting josepy
  Downloading josepy-1.5.0-py2.py3-none-any.whl (57 kB)
Collecting eliot>=0.8.0
  Downloading eliot-1.12.0-py2.py3-none-any.whl (113 kB)
Collecting zipp>=0.5
  Downloading zipp-3.4.0-py3-none-any.whl (5.2 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting requests-toolbelt>=0.3.0
  Downloading requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
Collecting mock
  Downloading mock-4.0.2-py3-none-any.whl (28 kB)
Collecting pyrfc3339
  Downloading pyRFC3339-1.1-py2.py3-none-any.whl (5.7 kB)
Collecting boltons>=19.0.1
  Downloading boltons-20.2.1-py2.py3-none-any.whl (170 kB)
Building wheels for collected packages: matrix-synapse, signedjson, Twisted, matrix-synapse-ldap3
  Building wheel for matrix-synapse (setup.py): started
  Building wheel for matrix-synapse (setup.py): finished with status 'done'
  Created wheel for matrix-synapse: filename=matrix_synapse-1.23.0rc1-py3-none-any.whl size=1736505 sha256=902789491651d15d37dd64e626fea6a5c1b5d70e7845fee0c9befe320404ed7d
  Stored in directory: /tmp/pip-ephem-wheel-cache-eh7dmph5/wheels/97/2a/d6/72f4cdb6a99a74759484df7c58d40a275d70baca34c9405009
  Building wheel for signedjson (PEP 517): started
  Building wheel for signedjson (PEP 517): finished with status 'done'
  Created wheel for signedjson: filename=signedjson-1.1.1-py3-none-any.whl size=10242 sha256=ccaad803c65d370badca3f55be65836956209470083ea64af5e6b37dee8615c2
  Stored in directory: /root/.cache/pip/wheels/9a/d4/fd/f7444cd6c4af5b6ec2c18f0dbaad127c2f1529b9a52e718945
  Building wheel for Twisted (setup.py): started
  Building wheel for Twisted (setup.py): finished with status 'done'
  Created wheel for Twisted: filename=Twisted-20.3.0-cp38-cp38-linux_x86_64.whl size=3050797 sha256=72b2e67c394160fe164bcce00896127112296547a0f21d65b8030c4cb273707e
  Stored in directory: /root/.cache/pip/wheels/f2/36/1b/99fe6d339e1559e421556c69ad7bc8c869145e86a756c403f4
  Building wheel for matrix-synapse-ldap3 (setup.py): started
  Building wheel for matrix-synapse-ldap3 (setup.py): finished with status 'done'
  Created wheel for matrix-synapse-ldap3: filename=matrix_synapse_ldap3-0.1.4-py3-none-any.whl size=10483 sha256=556a62949c631d337f402f2b7889ee255e0989880411a1adbc513b6fafbfe5a1
  Stored in directory: /root/.cache/pip/wheels/90/42/a9/72edd16d81eda4f319635b30ee0bbb07520ec0a07d3a879168
Successfully built matrix-synapse signedjson Twisted matrix-synapse-ldap3
Installing collected packages: attrs, pyrsistent, six, jsonschema, frozendict, unpaddedbase64, simplejson, canonicaljson, zipp, importlib-metadata, pycparser, cffi, pynacl, typing-extensions, signedjson, idna, cryptography, pyasn1, pyasn1-modules, service-identity, zope.interface, constantly, incremental, Automat, hyperlink, PyHamcrest, Twisted, certifi, urllib3, chardet, requests, treq, pyopenssl, pyyaml, bcrypt, pillow, sortedcontainers, pymacaroons, msgpack, phonenumbers, prometheus-client, netaddr, MarkupSafe, Jinja2, pyparsing, packaging, webencodings, bleach, sentry-sdk, hiredis, thrift, tornado, threadloop, opentracing, jaeger-client, lxml, ldap3, matrix-synapse-ldap3, pytz, python-dateutil, defusedxml, pysaml2, txsni, requests-toolbelt, mock, josepy, pyrfc3339, acme, pem, boltons, eliot, txacme, txredisapi, authlib, psycopg2, pyjwt, matrix-synapse
Successfully installed Automat-20.2.0 Jinja2-2.11.2 MarkupSafe-1.1.1 PyHamcrest-2.0.2 Twisted-20.3.0 acme-0.40.1 attrs-20.3.0 authlib-0.15.2 bcrypt-3.2.0 bleach-3.2.1 boltons-20.2.1 canonicaljson-1.4.0 certifi-2020.11.8 cffi-1.14.3 chardet-3.0.4 constantly-15.1.0 cryptography-3.2.1 defusedxml-0.6.0 eliot-1.12.0 frozendict-1.2 hiredis-1.1.0 hyperlink-20.0.1 idna-2.10 importlib-metadata-2.0.0 incremental-17.5.0 jaeger-client-4.3.0 josepy-1.5.0 jsonschema-3.2.0 ldap3-2.8.1 lxml-4.6.1 matrix-synapse-1.23.0rc1 matrix-synapse-ldap3-0.1.4 mock-4.0.2 msgpack-1.0.0 netaddr-0.8.0 opentracing-2.3.0 packaging-20.4 pem-20.1.0 phonenumbers-8.12.13 pillow-8.0.1 prometheus-client-0.8.0 psycopg2-2.8.6 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 pyjwt-1.7.1 pymacaroons-0.13.0 pynacl-1.4.0 pyopenssl-19.1.0 pyparsing-2.4.7 pyrfc3339-1.1 pyrsistent-0.17.3 pysaml2-6.3.1 python-dateutil-2.8.1 pytz-2020.4 pyyaml-5.3.1 requests-2.25.0 requests-toolbelt-0.9.1 sentry-sdk-0.19.3 service-identity-18.1.0 signedjson-1.1.1 simplejson-3.17.2 six-1.15.0 sortedcontainers-2.3.0 threadloop-1.0.2 thrift-0.13.0 tornado-6.1 treq-20.9.0 txacme-0.9.3 txredisapi-1.4.7 txsni-0.2.0 typing-extensions-3.7.4.3 unpaddedbase64-1.1.0 urllib3-1.26.2 webencodings-0.5.1 zipp-3.4.0 zope.interface-5.2.0
Removing intermediate container 49cddaf4df09
 ---> 63991538dc2f
Step 9/17 : FROM docker.io/python:${PYTHON_VERSION}-slim
 ---> 41dcfe21e8fd
Step 10/17 : RUN apt-get update && apt-get install -y     curl     gosu     libjpeg62-turbo     libpq5     libwebp6     xmlsec1  && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> bea66f2b1d08
Step 11/17 : COPY --from=builder /install /usr/local
 ---> 844fbc643b1f
Step 12/17 : COPY ./docker/start.py /start.py
 ---> b5b203c8bb21
Step 13/17 : COPY ./docker/conf /conf
 ---> afc58fdc3225
Step 14/17 : VOLUME ["/data"]
 ---> Running in 2b7bcdd26a39
Removing intermediate container 2b7bcdd26a39
 ---> 7547f731e2aa
Step 15/17 : EXPOSE 8008/tcp 8009/tcp 8448/tcp
 ---> Running in f8e80c19c905
Removing intermediate container f8e80c19c905
 ---> cc11b14258e7
Step 16/17 : ENTRYPOINT ["/start.py"]
 ---> Running in 4c993f948bc7
Removing intermediate container 4c993f948bc7
 ---> 595500c30615
Step 17/17 : HEALTHCHECK --interval=1m --timeout=5s   CMD curl -fSs http://localhost:8008/health || exit 1
 ---> Running in b057943d513e
Removing intermediate container b057943d513e
 ---> 8717c6bbfd91
Successfully built 8717c6bbfd91
Successfully tagged asd:latest
(env) ➜  synapse git:(anoa/prometheus_client_docker) ✗ docker run -d --name asd \
>     --mount type=volume,src=synapse-data,dst=/data \
>     -p 8008:8008 \
>     matrixdotorg/synapse:latest
ed364506f482a2999bb8bda13405b31d5648b653127145bb342d63927f17e512
(env) ➜  synapse git:(anoa/prometheus_client_docker) ✗ docker logs asd 
This server is configured to use 'matrix.org' as its trusted key server via the
'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
server since it is long-lived, stable and trusted. However, some admins may
wish to use another server for this purpose.

To suppress this warning and continue using 'matrix.org', admins should set
'suppress_key_server_warning' to 'true' in homeserver.yaml.
--------------------------------------------------------------------------------
2020-11-17 13:44:02,792 - twisted - 254 - INFO - None - Redirected stdout/stderr to logs
2020-11-17 13:44:02,792 - root - 319 - WARNING - None - ***** STARTING SERVER *****
2020-11-17 13:44:02,792 - root - 320 - WARNING - None - Server /usr/local/lib/python3.8/site-packages/synapse/app/homeserver.py version 1.22.1
2020-11-17 13:44:02,792 - root - 321 - INFO - None - Server hostname: myserver.invalid
2020-11-17 13:44:02,792 - root - 322 - INFO - None - Instance name: master
2020-11-17 13:44:02,792 - synapse.app.homeserver - 363 - INFO - None - Setting up server
2020-11-17 13:44:02,792 - synapse.server - 266 - INFO - None - Setting up.
2020-11-17 13:44:02,799 - synapse.storage.databases - 50 - INFO - None - [database config 'master']: Checking database server
2020-11-17 13:44:02,799 - synapse.storage.databases - 53 - INFO - None - [database config 'master']: Preparing for databases ['main', 'state']
2020-11-17 13:44:02,800 - synapse.storage.prepare_database - 102 - INFO - None - ['main', 'state']: Checking existing schema version
2020-11-17 13:44:02,803 - synapse.storage.prepare_database - 138 - INFO - None - ['main', 'state']: Initialising new database
2020-11-17 13:44:02,840 - synapse.storage.prepare_database - 377 - INFO - None - Applying schema deltas for v55
2020-11-17 13:44:02,841 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 55/access_token_expiry.sql
2020-11-17 13:44:02,843 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 55/track_threepid_validations.sql
2020-11-17 13:44:02,844 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 55/users_alter_deactivated.sql
2020-11-17 13:44:02,846 - synapse.storage.prepare_database - 377 - INFO - None - Applying schema deltas for v56
2020-11-17 13:44:02,847 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/add_spans_to_device_lists.sql
2020-11-17 13:44:02,849 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/current_state_events_membership.sql
2020-11-17 13:44:02,853 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/current_state_events_membership_mk2.sql
2020-11-17 13:44:02,854 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/delete_keys_from_deleted_backups.sql
2020-11-17 13:44:02,854 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/destinations_failure_ts.sql
2020-11-17 13:44:02,857 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/device_stream_id_insert.sql
2020-11-17 13:44:02,858 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/devices_last_seen.sql
2020-11-17 13:44:02,863 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/drop_unused_event_tables.sql
2020-11-17 13:44:02,864 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/event_expiry.sql
2020-11-17 13:44:02,865 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/event_labels.sql
2020-11-17 13:44:02,866 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/event_labels_background_update.sql
2020-11-17 13:44:02,867 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/fix_room_keys_index.sql
2020-11-17 13:44:02,868 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/hidden_devices.sql
2020-11-17 13:44:02,871 - synapse.storage.prepare_database - 472 - INFO - None - Applying engine-specific schema 56/hidden_devices_fix.sql.sqlite
2020-11-17 13:44:02,877 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/nuke_empty_communities_from_db.sql
2020-11-17 13:44:02,879 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/public_room_list_idx.sql
2020-11-17 13:44:02,879 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/redaction_censor.sql
2020-11-17 13:44:02,881 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/redaction_censor2.sql
2020-11-17 13:44:02,883 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/redaction_censor4.sql
2020-11-17 13:44:02,885 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/remove_tombstoned_rooms_from_directory.sql
2020-11-17 13:44:02,886 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/room_key_etag.sql
2020-11-17 13:44:02,889 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/room_membership_idx.sql
2020-11-17 13:44:02,891 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/room_retention.sql
2020-11-17 13:44:02,892 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/signing_keys.sql
2020-11-17 13:44:02,894 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/signing_keys_nonunique_signatures.sql
2020-11-17 13:44:02,894 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/state_group_room_idx.sql
2020-11-17 13:44:02,895 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/stats_separated.sql
2020-11-17 13:44:02,899 - synapse.storage.prepare_database - 449 - INFO - None - Running script 56/unique_user_filter_index.py
2020-11-17 13:44:02,907 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/user_external_ids.sql
2020-11-17 13:44:02,908 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 56/users_in_public_rooms_idx.sql
2020-11-17 13:44:02,909 - synapse.storage.prepare_database - 377 - INFO - None - Applying schema deltas for v57
2020-11-17 13:44:02,909 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 57/delete_old_current_state_events.sql
2020-11-17 13:44:02,910 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 57/device_list_remote_cache_stale.sql
2020-11-17 13:44:02,911 - synapse.storage.prepare_database - 449 - INFO - None - Running script 57/local_current_membership.py
2020-11-17 13:44:02,912 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 57/remove_sent_outbound_pokes.sql
2020-11-17 13:44:02,912 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 57/rooms_version_column.sql
2020-11-17 13:44:02,914 - synapse.storage.prepare_database - 472 - INFO - None - Applying engine-specific schema 57/rooms_version_column_2.sql.sqlite
2020-11-17 13:44:02,915 - synapse.storage.prepare_database - 472 - INFO - None - Applying engine-specific schema 57/rooms_version_column_3.sql.sqlite
2020-11-17 13:44:02,915 - synapse.storage.prepare_database - 377 - INFO - None - Applying schema deltas for v58
2020-11-17 13:44:02,917 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/00background_update_ordering.sql
2020-11-17 13:44:02,920 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/02remove_dup_outbound_pokes.sql
2020-11-17 13:44:02,921 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/03persist_ui_auth.sql
2020-11-17 13:44:02,923 - synapse.storage.prepare_database - 449 - INFO - None - Running script 58/06dlols_unique_idx.py
2020-11-17 13:44:02,923 - synapse.storage.v58_06dlols_unique_idx - 51 - INFO - None - Rebuilding device_lists_outbound_last_success with unique index
2020-11-17 13:44:02,930 - synapse.storage.prepare_database - 472 - INFO - None - Applying engine-specific schema 58/07add_method_to_thumbnail_constraint.sql.sqlite
2020-11-17 13:44:02,945 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/07persist_ui_auth_ips.sql
2020-11-17 13:44:02,946 - synapse.storage.prepare_database - 472 - INFO - None - Applying engine-specific schema 58/08_media_safe_from_quarantine.sql.sqlite
2020-11-17 13:44:02,948 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/09shadow_ban.sql
2020-11-17 13:44:02,950 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/10_pushrules_enabled_delete_obsolete.sql
2020-11-17 13:44:02,951 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/10drop_local_rejections_stream.sql
2020-11-17 13:44:02,953 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/10federation_pos_instance_name.sql
2020-11-17 13:44:02,956 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/11dehydration.sql
2020-11-17 13:44:02,957 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/11fallback.sql
2020-11-17 13:44:02,958 - synapse.storage.prepare_database - 449 - INFO - None - Running script 58/11user_id_seq.py
2020-11-17 13:44:02,958 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/12room_stats.sql
2020-11-17 13:44:02,958 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/13remove_presence_allow_inbound.sql
2020-11-17 13:44:02,959 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/14events_instance_name.sql
2020-11-17 13:44:02,961 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/15_catchup_destination_rooms.sql
2020-11-17 13:44:02,962 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/15unread_count.sql
2020-11-17 13:44:02,967 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/16populate_stats_process_rooms_fix.sql
2020-11-17 13:44:02,972 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/17_catchup_last_successful.sql
2020-11-17 13:44:02,975 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/18stream_positions.sql
2020-11-17 13:44:02,975 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/19txn_id.sql
2020-11-17 13:44:02,976 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/20instance_name_event_tables.sql
2020-11-17 13:44:02,980 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/20user_daily_visits.sql
2020-11-17 13:44:02,982 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/21as_device_stream.sql
2020-11-17 13:44:02,988 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/21drop_device_max_stream_id.sql
2020-11-17 13:44:02,988 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/22puppet_token.sql
2020-11-17 13:44:02,990 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/22users_have_local_media.sql
2020-11-17 13:44:02,991 - synapse.storage.prepare_database - 464 - INFO - None - Applying schema 58/23e2e_cross_signing_keys_idx.sql
2020-11-17 13:44:02,991 - synapse.storage.prepare_database - 497 - INFO - None - Schema now up to date
2020-11-17 13:44:03,012 - synapse.storage.databases - 65 - INFO - None - [database config 'master']: Starting 'main' database
2020-11-17 13:44:03,012 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for presence_stream(stream_id)
2020-11-17 13:44:03,012 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for device_inbox(stream_id)
2020-11-17 13:44:03,012 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for public_room_list_stream(stream_id)
2020-11-17 13:44:03,012 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for device_lists_stream(stream_id)
2020-11-17 13:44:03,012 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for user_signature_stream(stream_id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for device_lists_outbound_pokes(stream_id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for e2e_cross_signing_keys(stream_id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for event_reports(id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for push_rules(id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for push_rules_enable(id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for pushers(id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for deleted_pushers(stream_id)
2020-11-17 13:44:03,013 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for local_group_updates(stream_id)
2020-11-17 13:44:03,014 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for receipts_linearized(stream_id)
2020-11-17 13:44:03,014 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for account_data_max_stream_id(stream_id)
2020-11-17 13:44:03,014 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for room_account_data(stream_id)
2020-11-17 13:44:03,014 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for room_tags_revisions(stream_id)
2020-11-17 13:44:03,015 - synapse.storage.databases.main.event_push_actions - 530 - INFO - None - Searching for stream ordering 1 month ago
2020-11-17 13:44:03,015 - synapse.storage.databases.main.event_push_actions - 534 - INFO - None - Found stream ordering 1 month ago: it's 0
2020-11-17 13:44:03,015 - synapse.storage.databases.main.event_push_actions - 537 - INFO - None - Searching for stream ordering 1 day ago
2020-11-17 13:44:03,015 - synapse.storage.databases.main.event_push_actions - 541 - INFO - None - Found stream ordering 1 day ago: it's 0
2020-11-17 13:44:03,017 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for events(stream_ordering)
2020-11-17 13:44:03,017 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for events(stream_ordering)
2020-11-17 13:44:03,017 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for ex_outlier_stream(event_stream_ordering)
2020-11-17 13:44:03,024 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for push_rules_stream(stream_id)
2020-11-17 13:44:03,027 - synapse.storage.util.id_generators - 57 - INFO - None - initialising stream generator for access_tokens(id)
2020-11-17 13:44:03,028 - synapse.storage.databases - 82 - INFO - None - [database config 'master']: Starting 'state' database
2020-11-17 13:44:03,029 - synapse.storage.databases - 97 - INFO - None - [database config 'master']: prepared
2020-11-17 13:44:03,029 - synapse.server - 269 - INFO - None - Finished setting up.
2020-11-17 13:44:03,043 - synapse.push.pusher - 33 - INFO - None - email enable notifs: False
2020-11-17 13:44:03,061 - synapse.handlers.auth - 189 - INFO - None - Extra password_providers: []
2020-11-17 13:44:03,069 - synapse.federation.federation_server - 885 - INFO - None - Registering federation EDU handler for 'm.device_list_update'
2020-11-17 13:44:03,071 - synapse.federation.federation_server - 905 - INFO - None - Registering federation query handler for 'profile'
2020-11-17 13:44:03,077 - synapse.federation.federation_server - 885 - INFO - None - Registering federation EDU handler for 'm.presence'
2020-11-17 13:44:03,078 - synapse.federation.federation_server - 885 - INFO - None - Registering federation EDU handler for 'm.typing'
2020-11-17 13:44:03,082 - synapse.federation.federation_server - 905 - INFO - None - Registering federation query handler for 'directory'
2020-11-17 13:44:03,090 - synapse.app.homeserver - 113 - INFO -  - Running
2020-11-17 13:44:03,090 - synapse.app.homeserver - 30 - INFO -  - Set file limit to: 1048576
2020-11-17 13:44:03,091 - synapse.handlers.deactivate_account - 187 - INFO - user_parter_loop-0 - Starting user parter
2020-11-17 13:44:03,123 - synapse.federation.federation_server - 885 - INFO -  - Registering federation EDU handler for 'm.receipt'
2020-11-17 13:44:03,124 - synapse.federation.federation_server - 885 - INFO -  - Registering federation EDU handler for 'org.matrix.signing_key_update'
2020-11-17 13:44:03,124 - synapse.federation.federation_server - 905 - INFO -  - Registering federation query handler for 'client_keys'
2020-11-17 13:44:03,126 - synapse.federation.federation_server - 885 - INFO -  - Registering federation EDU handler for 'm.direct_to_device'
2020-11-17 13:44:03,147 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.health.HealthResource object at 0x7f80da0e9760> to path b'/health'
2020-11-17 13:44:03,147 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.ClientRestResource object at 0x7f80da0e97f0> to path b'/_matrix/client/api/v1'
2020-11-17 13:44:03,147 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.ClientRestResource object at 0x7f80da0e97f0> to path b'/_matrix/client/r0'
2020-11-17 13:44:03,147 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.ClientRestResource object at 0x7f80da0e97f0> to path b'/_matrix/client/unstable'
2020-11-17 13:44:03,147 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.ClientRestResource object at 0x7f80da0e97f0> to path b'/_matrix/client/v2_alpha'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.ClientRestResource object at 0x7f80da0e97f0> to path b'/_matrix/client/versions'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.well_known.WellKnownResource object at 0x7f80d98b7070> to path b'/.well-known/matrix/client'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.admin.AdminRestResource object at 0x7f80d98b7130> to path b'/_synapse/admin'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching FilePath('/usr/local/lib/python3.8/site-packages/synapse/static') to path b'/_matrix/static'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.media.v1.media_repository.MediaRepositoryResource object at 0x7f80d98be190> to path b'/_matrix/media/r0'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.media.v1.media_repository.MediaRepositoryResource object at 0x7f80d98be190> to path b'/_matrix/media/v1'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.federation.transport.server.TransportLayerServer object at 0x7f80d98be370> to path b'/_matrix/federation'
2020-11-17 13:44:03,148 - synapse.util.httpresourcetree - 46 - INFO -  - Attaching <synapse.rest.key.v2.KeyApiV2Resource object at 0x7f80d98be430> to path b'/_matrix/key/v2'
2020-11-17 13:44:03,148 - twisted - 254 - INFO -  - SynapseSite starting on 8008
2020-11-17 13:44:03,149 - synapse.app - 47 - WARNING -  - Failed to listen on 0.0.0.0, continuing because listening on [::]
2020-11-17 13:44:03,149 - synapse.app.homeserver - 162 - INFO -  - Synapse now listening on TCP port 8008
2020-11-17 13:44:03,209 - synapse.storage.background_updates - 101 - INFO - background_updates-0 - Starting background schema updates
2020-11-17 13:44:03,210 - synapse.handlers.deactivate_account - 197 - INFO - user_parter_loop-0 - User parter finished: stopping
2020-11-17 13:44:03,211 - synapse.push.pusherpool - 304 - INFO - start_pushers-0 - Started pushers
2020-11-17 13:44:04,212 - synapse.storage.background_updates - 224 - INFO - background_updates-0 - Starting update batch on background update 'add_rooms_room_version_column'
2020-11-17 13:44:04,219 - synapse.storage.background_updates - 260 - INFO - background_updates-0 - Running background update 'add_rooms_room_version_column'. Processed 100 items in 6ms. (total_rate=0/ms, current_rate=0/ms, total_updated=0, batch_size=100)
2020-11-17 13:44:05,223 - synapse.storage.background_updates - 224 - INFO - background_updates-0 - Starting update batch on background update 'current_state_events_membership'
2020-11-17 13:44:05,232 - synapse.storage.background_updates - 260 - INFO - background_updates-0 - Running background update 'current_state_events_membership'. Processed 0 items in 8ms. (total_rate=0/ms, current_rate=0/ms, total_updated=0, batch_size=100)
(env) ➜  synapse git:(anoa/prometheus_client_docker) ✗ 

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change looks good.

@@ -0,0 +1 @@
Cap the version of `prometheus-client` in the docker image to match Synapse's requirements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this say what bug is being fixed, not how we are doing so?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I've updated it. Does it look any better?

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@richvdh
Copy link
Member

richvdh commented Nov 17, 2020

hrm, one thought: where there are a couple of things to keep in sync, it's helpful to add comments to point between them. might be worth doing here? otherwise we're going to forget about the dockerfile come upgrade time

@richvdh
Copy link
Member

richvdh commented Nov 17, 2020

(another thought: is there actually anything stopping us upgrading to prom-client 0.9? we pin it because prom-client 0.4 broke the world, but that's unusual)

@anoadragon453
Copy link
Member Author

hrm, one thought: where there are a couple of things to keep in sync, it's helpful to add comments to point between them. might be worth doing here? otherwise we're going to forget about the dockerfile come upgrade time

Good point! I've done that now.

(another thought: is there actually anything stopping us upgrading to prom-client 0.9? we pin it because prom-client 0.4 broke the world, but that's unusual)

I'm not sure, though I imagined investigating that would take longer than this quick fix. I assume not however, as the <0.9.0 was just to stop a major version upgrade.

If 0.9.0 isn't a problem, then we can just set prometheus-client==0.*.* in python_dependencies.py?

@clokep
Copy link
Contributor

clokep commented Nov 17, 2020

If 0.9.0 isn't a problem, then we can just set prometheus-client==0.*.* in python_dependencies.py?

Doesn't the container not starting (as #8766 says) imply that 0.9.0 is a problem?

@richvdh
Copy link
Member

richvdh commented Nov 17, 2020

If 0.9.0 isn't a problem, then we can just set prometheus-client==0.. in python_dependencies.py?

well no; the point is that prometheus broke backwards compat between 0.3 and 0.4 (iirc), and we don't trust them not to do so again between 0.9 and 0.10. Note that, in semantic versioning, for versions 0.x.y, increases in x are defined to be "major upgrades".

If 0.9.0 isn't a problem, then we can just set prometheus-client==0.*.* in python_dependencies.py?

Doesn't the container not starting (as #8766 says) imply that 0.9.0 is a problem?

I think that's just synapse's startup check that the installed packages match whatever is declared in python_dependencies.py?

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's ship this and then argue about whether we can relax the range.

@anoadragon453
Copy link
Member Author

I think that's just synapse's startup check that the installed packages match whatever is declared in python_dependencies.py?

Precisely.

@anoadragon453 anoadragon453 merged commit c087f68 into release-v1.23.0 Nov 17, 2020
@anoadragon453 anoadragon453 deleted the anoa/prometheus_client_docker branch November 17, 2020 16:01
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Nov 18, 2020
Synapse 1.23.0 (2020-11-18)
===========================

This release changes the way structured logging is configured. See the [upgrade notes](UPGRADE.rst#upgrading-to-v1230) for details.

**Note**: We are aware of a trivially exploitable denial of service vulnerability in versions of Synapse prior to 1.20.0. Complete details will be disclosed on Monday, November 23rd. If you have not upgraded recently, please do so.

Bugfixes
--------

- Fix a dependency versioning bug in the Dockerfile that prevented Synapse from starting. ([\#8767](matrix-org/synapse#8767))


Synapse 1.23.0rc1 (2020-11-13)
==============================

Features
--------

- Add a push rule that highlights when a jitsi conference is created in a room. ([\#8286](matrix-org/synapse#8286))
- Add an admin api to delete a single file or files that were not used for a defined time from server. Contributed by @dklimpel. ([\#8519](matrix-org/synapse#8519))
- Split admin API for reported events (`GET /_synapse/admin/v1/event_reports`) into detail and list endpoints. This is a breaking change to #8217 which was introduced in Synapse v1.21.0. Those who already use this API should check their scripts. Contributed by @dklimpel. ([\#8539](matrix-org/synapse#8539))
- Support generating structured logs via the standard logging configuration. ([\#8607](matrix-org/synapse#8607), [\#8685](matrix-org/synapse#8685))
- Add an admin API to allow server admins to list users' pushers. Contributed by @dklimpel. ([\#8610](matrix-org/synapse#8610), [\#8689](matrix-org/synapse#8689))
- Add an admin API `GET /_synapse/admin/v1/users/<user_id>/media` to get information about uploaded media. Contributed by @dklimpel. ([\#8647](matrix-org/synapse#8647))
- Add an admin API for local user media statistics. Contributed by @dklimpel. ([\#8700](matrix-org/synapse#8700))
- Add `displayname` to Shared-Secret Registration for admins. ([\#8722](matrix-org/synapse#8722))


Bugfixes
--------

- Fix fetching of E2E cross signing keys over federation when only one of the master key and device signing key is cached already. ([\#8455](matrix-org/synapse#8455))
- Fix a bug where Synapse would blindly forward bad responses from federation to clients when retrieving profile information. ([\#8580](matrix-org/synapse#8580))
- Fix a bug where the account validity endpoint would silently fail if the user ID did not have an expiration time. It now returns a 400 error. ([\#8620](matrix-org/synapse#8620))
- Fix email notifications for invites without local state. ([\#8627](matrix-org/synapse#8627))
- Fix handling of invalid group IDs to return a 400 rather than log an exception and return a 500. ([\#8628](matrix-org/synapse#8628))
- Fix handling of User-Agent headers that are invalid UTF-8, which caused user agents of users to not get correctly recorded. ([\#8632](matrix-org/synapse#8632))
- Fix a bug in the `joined_rooms` admin API if the user has never joined any rooms. The bug was introduced, along with the API, in v1.21.0. ([\#8643](matrix-org/synapse#8643))
- Fix exception during handling multiple concurrent requests for remote media when using multiple media repositories. ([\#8682](matrix-org/synapse#8682))
- Fix bug that prevented Synapse from recovering after losing connection to the database. ([\#8726](matrix-org/synapse#8726))
- Fix bug where the `/_synapse/admin/v1/send_server_notice` API could send notices to non-notice rooms. ([\#8728](matrix-org/synapse#8728))
- Fix PostgreSQL port script fails when DB has no backfilled events. Broke in v1.21.0. ([\#8729](matrix-org/synapse#8729))
- Fix PostgreSQL port script to correctly handle foreign key constraints. Broke in v1.21.0. ([\#8730](matrix-org/synapse#8730))
- Fix PostgreSQL port script so that it can be run again after a failure. Broke in v1.21.0. ([\#8755](matrix-org/synapse#8755))


Improved Documentation
----------------------

- Instructions for Azure AD in the OpenID Connect documentation. Contributed by peterk. ([\#8582](matrix-org/synapse#8582))
- Improve the sample configuration for single sign-on providers. ([\#8635](matrix-org/synapse#8635))
- Fix the filepath of Dex's example config and the link to Dex's Getting Started guide in the OpenID Connect docs. ([\#8657](matrix-org/synapse#8657))
- Note support for Python 3.9. ([\#8665](matrix-org/synapse#8665))
- Minor updates to docs on running tests. ([\#8666](matrix-org/synapse#8666))
- Interlink prometheus/grafana documentation. ([\#8667](matrix-org/synapse#8667))
- Notes on SSO logins and media_repository worker. ([\#8701](matrix-org/synapse#8701))
- Document experimental support for running multiple event persisters. ([\#8706](matrix-org/synapse#8706))
- Add information regarding the various sources of, and expected contributions to, Synapse's documentation to `CONTRIBUTING.md`. ([\#8714](matrix-org/synapse#8714))
- Migrate documentation `docs/admin_api/event_reports` to markdown. ([\#8742](matrix-org/synapse#8742))
- Add some helpful hints to the README for new Synapse developers. Contributed by @chagai95. ([\#8746](matrix-org/synapse#8746))


Internal Changes
----------------

- Optimise `/createRoom` with multiple invited users. ([\#8559](matrix-org/synapse#8559))
- Implement and use an `@lru_cache` decorator. ([\#8595](matrix-org/synapse#8595))
- Don't instansiate Requester directly. ([\#8614](matrix-org/synapse#8614))
- Type hints for `RegistrationStore`. ([\#8615](matrix-org/synapse#8615))
- Change schema to support access tokens belonging to one user but granting access to another. ([\#8616](matrix-org/synapse#8616))
- Remove unused OPTIONS handlers. ([\#8621](matrix-org/synapse#8621))
- Run `mypy` as part of the lint.sh script. ([\#8633](matrix-org/synapse#8633))
- Correct Synapse's PyPI package name in the OpenID Connect installation instructions. ([\#8634](matrix-org/synapse#8634))
- Catch exceptions during initialization of `password_providers`. Contributed by Nicolai Søborg. ([\#8636](matrix-org/synapse#8636))
- Fix typos and spelling errors in the code. ([\#8639](matrix-org/synapse#8639))
- Reduce number of OpenTracing spans started. ([\#8640](matrix-org/synapse#8640), [\#8668](matrix-org/synapse#8668), [\#8670](matrix-org/synapse#8670))
- Add field `total` to device list in admin API. ([\#8644](matrix-org/synapse#8644))
- Add more type hints to the application services code. ([\#8655](matrix-org/synapse#8655), [\#8693](matrix-org/synapse#8693))
- Tell Black to format code for Python 3.5. ([\#8664](matrix-org/synapse#8664))
- Don't pull event from DB when handling replication traffic. ([\#8669](matrix-org/synapse#8669))
- Abstract some invite-related code in preparation for landing knocking. ([\#8671](matrix-org/synapse#8671), [\#8688](matrix-org/synapse#8688))
- Clarify representation of events in logfiles. ([\#8679](matrix-org/synapse#8679))
- Don't require `hiredis` package to be installed to run unit tests. ([\#8680](matrix-org/synapse#8680))
- Fix typing info on cache call signature to accept `on_invalidate`. ([\#8684](matrix-org/synapse#8684))
- Fail tests if they do not await coroutines. ([\#8690](matrix-org/synapse#8690))
- Improve start time by adding an index to `e2e_cross_signing_keys.stream_id`. ([\#8694](matrix-org/synapse#8694))
- Re-organize the structured logging code to separate the TCP transport handling from the JSON formatting. ([\#8697](matrix-org/synapse#8697))
- Use Python 3.8 in Docker images by default. ([\#8698](matrix-org/synapse#8698))
- Remove the "draft" status of the Room Details Admin API. ([\#8702](matrix-org/synapse#8702))
- Improve the error returned when a non-string displayname or avatar_url is used when updating a user's profile. ([\#8705](matrix-org/synapse#8705))
- Block attempts by clients to send server ACLs, or redactions of server ACLs, that would result in the local server being blocked from the room. ([\#8708](matrix-org/synapse#8708))
- Add metrics the allow the local sysadmin to track 3PID `/requestToken` requests. ([\#8712](matrix-org/synapse#8712))
- Consolidate duplicated lists of purged tables that are checked in tests. ([\#8713](matrix-org/synapse#8713))
- Add some `mdui:UIInfo` element examples for `saml2_config` in the homeserver config. ([\#8718](matrix-org/synapse#8718))
- Improve the error message returned when a remote server incorrectly sets the `Content-Type` header in response to a JSON request. ([\#8719](matrix-org/synapse#8719))
- Speed up repeated state resolutions on the same room by caching event ID to auth event ID lookups. ([\#8752](matrix-org/synapse#8752))


Synapse 1.22.1 (2020-10-30)
===========================

Bugfixes
--------

- Fix a bug where an appservice may not be forwarded events for a room it was recently invited to. Broke in v1.22.0. ([\#8676](matrix-org/synapse#8676))
- Fix `Object of type frozendict is not JSON serializable` exceptions when using third-party event rules. Broke in v1.22.0. ([\#8678](matrix-org/synapse#8678))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synapse Docker container doesn't start due to prometheus_client version 0.9.0
3 participants