- Oct 03, 2022
-
-
vlorentz authored
This mirrors the behavior of the synchronous server. In practice, this means the objstorage won't log ObjNotFoundError or report them to Sentry.
-
- Sep 12, 2022
-
-
Antoine Lambert authored
In order for that useful fixture to be shared across multiple swh packages, move it from swh-indexer to main swh-core pytest plugin. Also add a couple of tests for it.
-
- Aug 23, 2022
-
-
vlorentz authored
Without the return, 'psycopg2.connect(db_or_conninfo)' is actually reachable when calling next() twice on the generator
-
- Aug 19, 2022
-
-
Antoine Lambert authored
-
- Aug 09, 2022
- Aug 05, 2022
- Aug 04, 2022
-
-
vlorentz authored
According to <https://github.com/pallets/flask/issues/4734#issuecomment-1204124984>, app.test_client() should not be used as a long-lived context manager. This causes swh-indexer's tests to break with Flask >= 2.2.0 because some of them start threads within the lifespan of the context manager, which causes a crash. As far as I can tell, simply assigning app.test_client() instead of entering does not break anything.
-
- Jul 05, 2022
-
-
David Douard authored
so one can create database (e.g. for unit tests) of given flavor.
-
- Jul 04, 2022
-
-
vlorentz authored
We already have 'msgpack >= 1.0.0' in requirements.txt
-
- Jun 16, 2022
-
-
Franck Bret authored
_zst_unpack method added to support '.tar.zst' extension and 'application/zstd', 'application/x-zstd' mime type. Add archive example file and a test for unpacking zst file.
-
- Jun 09, 2022
-
-
Antoine Lambert authored
It exists many cases where using unzip to extract a jar archive fails while using the zipfile module succeeds. So prefer to use the zipfile module to uncompress jar archives. Related to T4318
-
- Jun 08, 2022
-
-
Antoine R. Dumont authored
Discovered when working on [1]. Related to T4228 [1] D7949
-
Antoine R. Dumont authored
This now automatically grant read-only access to the guest user at db initialization or upgrade time. This way, sysadm no longer have to manually alter the schema after initialization or upgrade. Related to T4228
-
- Jun 02, 2022
-
-
Antoine R. Dumont authored
The sample of those exotic urls got extracted out the staging scheduler [1]. And the actual run of that code makes the github api (without mocks) returns the correct canonical urls [2] Related to T3874 [1] P1371 [2] ``` $ ipython ... In [1]: from swh.core.github.utils import get_canonical_github_origin_url In [2]: get_canonical_github_origin_url('git@github.com/huaweicloud/huaweicloud-sdk-java-v3.git') No tokens set in configuration, using anonymous mode Out[2]: 'https://github.com/huaweicloud/huaweicloud-sdk-java-v3' In [3]: get_canonical_github_origin_url('git//github.com/powertac/powertac-server.git') No tokens set in configuration, using anonymous mode Out[3]: 'https://github.com/powertac/powertac-server' In [4]: get_canonical_github_origin_url('https://${env.GITHUB_USER}:${env.GITHUB_TOKEN}@github.com/molgenis/vibe.git') No tokens set in configuration, using anonymous mode Out[4]: 'https://github.com/molgenis/vibe' In [5]: get_canonical_github_origin_url('ssh://git@github.com/softwaremagico/ThinkMachine.git') No tokens set in configuration, using anonymous mode Out[5]: 'https://github.com/softwaremagico/ThinkMachine' In [6]: get_canonical_github_origin_url('ssh://github.com:alibaba/SmartEngine.git') No tokens set in configuration, using anonymous mode Out[6]: 'https://github.com/alibaba/SmartEngine' In [7]: get_canonical_github_origin_url('//github.com:networknt/light-tram-kafka.git') No tokens set in configuration, using anonymous mode Out[7]: 'https://github.com/networknt/light-tram-kafka' In [8]: get_canonical_github_origin_url('[fetch=]git@github.com:turnonline/ecosystem-admin-widgets.git') No tokens set in configuration, using anonymous mode Out[8]: 'https://github.com/turnonline/ecosystem-admin-widgets' In [9]: get_canonical_github_origin_url('git@github.com:ttulka/spring-boot-configuration-properties-store.git') No tokens set in configuration, using anonymous mode Out[9]: 'https://github.com/ttulka/spring-boot-configuration-properties-store' ```
-
- 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>
-