Odoo requires urllib3 == 1.26.5
e0feda4629/requirements.txt (L56)
sentry-sdk > 1.9.0 required urllib3 >= 1.26.11
4f1f782fbe/setup.py (L43)
Currently, urllib3 >= 1.26.11 is causing the following error in
response.py:
``` Traceback (most recent call last):
"/home/odoo/.local/lib/python3.8/site-packages/urllib3/response.py",
line 705, in _error_catcher
yield
File
"/home/odoo/.local/lib/python3.8/site-packages/urllib3/response.py",
line 830, in _raw_read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
urllib3.exceptions.IncompleteRead: IncompleteRead(1501 bytes read, -827
more expected)
```
On the other hand, sentry 1.9.0 supports urllib3 >= 1.10.0, satisfying
odoo requirements.
This partially reverts
d7ae024951.
That was initially introduced to support newer versions of `sentry_sdk`, but won't be required anymore
due to this downgrade.
Currently, version 1.17.0 of sentry_sdk is causing the following error:
SentryOption("with_locals", DEFAULT_OPTIONS["with_locals"], None),
KeyError: 'with_locals'.
Where the with_locals key is not found in the dictionary, generating an
error, stopping the installation of the sentry module.
In version 1.17.0 rename 'with_locals' to 'include_local_variables'
79e33169aa
This commit adjust the get_sentry_options() method in
https://github.com/Vauxoo/server-tools/blob/16.0/sentry/const.py file, set the new variable.
The test code uses a "mock" Transport object to ensure that events are
stored locally in memory, instead of triggering network requests.
The Sentry client is cleaned up once done, and this triggers a call to
capture_envelope, a different way of sending events to Sentry. Since
our mock class did not fully complete initialization, and also did
not provide an overriding method, the original was called, which
depends on proper initialization to work.
We introduce an override for capture_envelope: as it is meant to be
a "sibling" to capture_event, it makes sense for us to also make sure
events registrered in this way are intercepted, even if we don't
currently expect any of our tests to explicitly cause it to be used.
Because post_load is called after odoo.service.server start
It has already registered the unpatched odoo.service.wsgi_server.application
So patch it here too.
This enables wsgi performance reporting with sentry_traces_sample_rate
Allow using `sentry_release` or `sentry_odoo_dir` in the Odoo
configuration file.
Previously, the `sentry_odoo_dir` was never actually respected. It would
always be overridden by `sentry_release`. Even if `sentry_release` is
not set, it will use an empty value instead of using `sentry_odoo_dir`
to find the Git commit hash.
After this commit, the `sentry_release` parameter still takes
precedence. However, if `sentry_release` is not set and
`sentry_odoo_dir` is set, then `sentry_odoo_dir` will be used to find
the appropriate Git commit hash, which will be used as the `release`
value.
Both cases are covered by the added unit tests.
The following warning is fixed:
DeprecationWarning: Using or importing the ABCs from 'collections' instead of
from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop
working
sentry: It is not always possible to read commit information from
a production environment. In those cases it is useful to be able
to set a release version manually.
[UPD] Update sentry.pot