- Jun 01, 2022
-
-
David Douard authored
-
David Douard authored
to prepare the deprecation of db/pytest_plugin.py; it's the only function from db/pytest_plugin.py still in use.
-
David Douard authored
-
David Douard authored
instead of the custom factory_fact.
-
- May 30, 2022
-
-
Antoine R. Dumont authored
This is the second part of 240ae09d. Related to T4228
-
Antoine R. Dumont authored
Some module cannot just define their module db configuration key entry as their module name because they define more services than just their db (e.g. indexer, scrubber, ...) Related to T4284
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
Related to T4284
-
Antoine R. Dumont authored
-
- May 20, 2022
-
-
Antoine R. Dumont authored
Related to T4232
-
Antoine R. Dumont authored
Related to T4232
-
- May 17, 2022
-
-
Antoine R. Dumont authored
This also: - sandbox the new module into its own package to simplify packaging Related to T4232
-
Antoine Lambert authored
With latest version of hypothesis, this test often raises the following error: hypothesis.errors.FailedHealthCheck: Data generation is extremely slow ... Setting the number of hypothesis examples for that test to a lower value makes the error goes away. This should also fix that test execution in the swh-environment/tests Jenkins job which often fails.
-
Antoine R. Dumont authored
This also: - extracts pytest fixtures needed to cover the GitHubSession code. - avoid mutating the inputted credentials passed in constructors - rework test docstrings to "it should" format for more concise description Related to T4232
-
- May 16, 2022
-
-
Antoine R. Dumont authored
This new code is within a new arborescence as some more code will get moved alongside in a new commit (the new session github currently in swh.lister module). That current code is making anonymous requests to the github api for now. Related to T4232
-
- May 11, 2022
-
-
David Douard authored
adding a swh/__main__.py file.
-
- Apr 26, 2022
-
-
Antoine R. Dumont authored
This allows to reduce the boilerplate regarding initial connection failures.
-
- Apr 25, 2022
-
-
vlorentz authored
types-psycopg2 2.9.12 contains this commit: https://github.com/python/typeshed/commit/506be4fb0adcf38af77325258af337772abcde77 which removes `Any` as the return type of the last variant, allowing mypy to type-check the returned value. However, mypy 0.920 only considers the last variant, even though we use the first one; causing the return type to be badly inferred, and erroring every time we use it as context manager.
-
- Apr 21, 2022
-
-
Antoine Lambert authored
That hook can be frustrating as it can discard a long commit message if it finds a typo in it so better removing it.
-
- Apr 15, 2022
-
-
Nicolas Dandrimont authored
Instead of only overriding the initial settings when they're left unset, always override the defaults when the environment variables are set. This makes the behavior more consistent with the way we usually handle environment variables. It also allows setting the environment variable `SWH_SENTRY_DISABLE_LOGGING_EVENTS=false`, to enable events based on the logging framework in gunicorn backends (where the default has been flipped to true).
-
Nicolas Dandrimont authored
Notably, using logging.config.dictConfig disables all loggers before setting its own config. There's no simple way of undoing these changes to the logging config. Even if we had a way to reset a basic logging config, pytest reuses its log handler instances across tests, so it's not even that simple to be able to reset the logging config from scratch and still have pytest able to capture logs. Instead of any of that, just add a fixture to reset the root logger level, and to mock logging.config.dictConfig so that it doesn't actually get called.
-
- Apr 14, 2022
-
-
Nicolas Dandrimont authored
By default, sentry's logging integration will report any error or exception-level logging as an event. Now that we explicitly capture exceptions in the RPC server app, we can disable this automatic event generation, and only use the logging integration to generate breadcrumbs.
-
Nicolas Dandrimont authored
add a configuration option to init_sentry to disable the error reporting from logging by sentry. This can be set via the SWH_SENTRY_DISABLE_LOGGING_EVENTS env var. Default behavior remains unchanged. Co-Authored-By:
David Douard <david.douard@sdfa3.org>
-
Nicolas Dandrimont authored
The error handler for RPC server classes is used for both unexpected exceptions (using a 5xx status code), and exceptions used for the normal execution flow, which are encoded on the server side, and decoded to be raised again on the client side (and use a 4xx status code). We only record sentry errors for the 5xx class exceptions.
-
Nicolas Dandrimont authored
This will give us a rough classification of the errors of timed functions, which will allow us to keep track of trends, without having to report all errors to sentry for analysis.
-
- Apr 08, 2022
-
-
Antoine Lambert authored
-
Antoine Lambert authored
-
Antoine Lambert authored
Related to T3922
-
Antoine Lambert authored
black is considered stable since release 22.1.0 and the version we are currently using is quite outdated and not compatible with click 8.1.0, so it is time to bump it to its latest stable release. Please note that E501 pycodestyle warning related to line length is replaced by B950 one from flake8-bugbear as recommended by black. https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length Related to T3922
-
- Apr 06, 2022
-
-
Antoine Lambert authored
pytest-postgresql 3.1.3 and pytest-redis 2.4.0 added support for pytest >= 7 so we can now drop the pytest pinning.
-
- Mar 30, 2022
-
-
David Douard authored
allowing these to be easily set from a config file.
-
- Mar 29, 2022
-
-
vlorentz authored
Since https://github.com/pallets/werkzeug/commit/74601150b559c73a8c8732b4c67bbc6377d1a7df (published yesterday as part of version 2.1.0), Werkzeug crashes when WERKZEUG_RUN_MAIN is true but WERKZEUG_SERVER_FD is not provided. This is legitimate, because applications should not set WERKZEUG_RUN_MAIN. This commit rewrites the hack hiding the server banner so it still works with this Werkzeug version.
-
- Mar 23, 2022
-
-
Antoine Lambert authored
Due to test modules being copied in subdirectories of the build directory by setuptools, it makes pytest fail by raising ImportPathMismatchError exceptions when invoked from root directory of the module. So ignore the build folder to discover tests.
-
- Mar 14, 2022
-
-
David Douard authored
-
David Douard authored
so it can be used in a script (e.g. docker entrypoint).
-
- Mar 09, 2022
-
-
David Douard authored
when no migration script is to be executed.
-
David Douard authored
-
- Mar 03, 2022
-
-
Nicolas Dandrimont authored
This avoids spamming a deprecation error clients can't do anything about.
-
vlorentz authored
swh_set_db_module() takes a db_or_conninfo object, and passes it to execute_sqlfiles, which only expects a conninfo. This is detected by mypy when using a recent version of types-psycopg2.
-
vlorentz authored
This may be needed depending on import order; but it makes mypy complain when types-psycopg2 is installed.
-