Commits on Source (84)
-
Antoine Lambert authored85015dae
-
Antoine Lambert authored9f853587
-
vlorentz authorede0d553df
-
vlorentz authored5dfe8fd6
-
Antoine Lambert authored
In order to remove warnings about /apidoc/*.rst files being included multiple times in toc when building full swh documentation, prefer to include module indices only when building standalone package documentation. Also include them the proper sphinx way. Related to T4496
788ded90 -
Antoine Lambert authored
-
Antoine Lambert authored
This fixes python 3.7 support due to poetry, a dependency of isort, that removed support for that Python version in a recent release.
-
Antoine Lambert authored
Related to swh/meta#4960
-
Related to swh/meta#4959
-
Antoine Lambert authored
It also enables to remove the version restriction on psycopg2. Related to swh/infra/sysadm-environment#4772
-
Jérémy Bobbio (Lunar) authored
GitLab will display the content of the README file when browsing the repository. But in case the file is a symlink, it will display the path pointed by the symlink. There is a 6 year old issue about this: https://gitlab.com/gitlab-org/gitlab/-/issues/15093 We can workaround the issue by having the content at the root of the repository and a symlink to this file in the `docs/` directory. Tested in swh/devel/swh-py-template!27
-
vlorentz authored
-
vlorentz authored
-
David Douard authored
That uses django.db.models' by default, and fall back to the old contrib one if need be. This later has been deprecated for some time and is now producing errors. Doing this should work in any situation. The migration is actually only a matter of the name of the type in the field metadata, so using a stable one (swh.deposit.model.JSONField) make it backend-agnostic.
-
vlorentz authored
-
Antoine R. Dumont authored
This adapts the memcached import the same way the swh.web module did. Follow up on 4698e8c9 Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
This adapts the memcached import the same way the swh.web module did. Follow up 9210c012 Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
This reverts commit bb22867c. Not ready yet
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
They were only checking one tarball case (the ones reference in the ready_deposit_ok deposit). This now creates as much deposit as there are extensions to check. This only had to adapt the deposit so it's provided with a valid metadata. Otherwise, the metadata checks were invalid, failing the overall tests. Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
Using the File api is consistent across various storage backends. The previous implementation was only working for file storage. As we are migrating towards remote backends, this no longer is enough. Unfortunately though, we cannot rely on zipfile.is_zipfile or tarfile.is_tarfile as those only works with local filepath. So we need to rely on testing & failing with exception trapping to read properly the tarballs... Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
Similar adaptation of the deposit_check endpoint to allow reading remote tarballs when using remote storage backends. Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
If done on the full path, the conditional technically fails the check for the wrong reason. This also adds tests on this case. Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
Currently, the writing in the azure objstorage adds extra headers to the blobs. Which prevents the correct reading of those blobs when checking the tarballs. According to the documentation, this option opening should allow to configure more appropriately. Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
Use None instead of empty string to try to prevent content-encoding to be set when writing. Refs. swh/infra/sysadm-environment#5129
-
Antoine R. Dumont authored
This ensures the deposit checks in the elastic infra (using azure objstorage) is working. There is currently no way to prevent the content-encoding from being detected and stored in the blobstorage (various tryouts have been tested to no avail). That content-encoding, is then preventing the checking/reading to work (failing [2]). Following the documentation, a workaround has been implemented to reset a posteriori the content-encoding [1]. It's not proper but, from repl experimentation, it's working which is better than the actual failure. [1] https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-properties-metadata-python [2] ``` HttpResponseError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check')) ``` Refs. swh/infra/sysadm-environment#5129
-
I found some deposits on staging which use <entry xmlns="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0"> instead
8116ef9d -
David Douard authoredea1e16e8
-
David Douard authored
The former does not always plays well with PEP420...
-
David Douard authored
-
Antoine Lambert authored7b0fac22
-
Antoine Lambert authored
It was placed in mypy.plugins.django-stubs section so it was not taken into account.
c7a65209 -
Antoine Lambert authored
As the known_first_party isort option was not set yet, previous imports ordering got broken so restore it.
-
David Douard authored
-
Antoine R. Dumont authored
-
Antoine Lambert authored
Turns these references into simple links in order for the rst checks performed by PyPI to pass when uploading a new package version.
-
Antoine Lambert authored
Side effect of https://github.com/sissaschool/xmlschema/commit/cdae888.
fed520cf -
Antoine Lambert authored
-
Nicolas Dandrimont authored
-
Antoine Lambert authored
Related to swh/meta#5075.
-
vlorentz authored
-
vlorentz authored
_complete_deposit() schedules a loading task; but it was called before the DepositRequest object was saved to the database. This means that if the loading tasks executes very fast, or the DepositRequest takes a while to save, then the loader won't see the current DepositRequest when it queries the deposit's current state. This is especially likely to happen with large code uploads, as saving them to disk happens before the DepositRequest row is written to the database.
-
Antoine Lambert authored
-
Pierre-Yves David authored
-
Antoine Lambert authored
The oldest part of the scheduler API was updated to use model classes (based on attr package) instead of dictionaries in order to improve typing.
-
David Douard authored
-
David Douard authored
-
Antoine Lambert authored742f0396
-
Antoine Lambert authored
-
Nicolas Dandrimont authored
The current logic would bypass the password check when the stored user information was younger than `refresh_expires_at`, which is a pretty long timeline.
-
Morane Otilia Gruenpeter authored
-
Renaud Boyer authored
-
vlorentz authored
-
vlorentz authored
PBKDF2 was taking about 30% of the runtime on my computer, possibly more on Jenkins. This should fix timeouts we have been getting on Jenkins lately
-
Renaud Boyer authored
-
Morane Otilia Gruenpeter authored
-
Antoine Lambert authored
Previously, trying to execute the following commands: - swh deposit upload ... - swh deposit status ... - swh deposit list ... - swh deposit metadata-only ... was returning the following error: Could not load subcommand swh.deposit: ImproperlyConfigured('Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.') So ensure to init django at the beginning of each command to fix their usability. Also prevent a similar side effect when swh.deposit.cli.client module is imported by moving the import of swh.deposit.utils.NAMESPACES from top level to the function it is used, this prevents the error message above to be displayed when using swh command shell autocompletion feature.
-
Antoine Lambert authored
Recent changes in swh-deposit codebase introduce cascading import of swh.deposit.models.Deposit when importing DepositChecker class from the swh.deposit.loader.checker module. Importing swh.deposit.models.Deposit requires django to be properly initialized which is usually not the case when the celery task modules are imported through the swh_scheduler_celery_worker pytest fixture, so numerous tests related to scheduler tasks in various swh packages were failing. So move import of DepositChecker class from top level to the task function to avoid such side effect.
-
Renaud Boyer authored5b7b8473
-
Renaud Boyer authored
-
Antoine Lambert authored
When the django storage backend storing deposited tarballs is a remote one (azure for instance), IncompleteRead errors can happen if the size of the tarball to read is large. Prefer to read tarball bytes by chunks instead to avoid these kind of issues. Fixes #4653.
-
Antoine Lambert authored
Django 5.x is used in production so we can remove the pinning to inferior versions in tox environments.
-
d7499c4a
-
Renaud Boyer authored
-
-
Antoine Lambert authored
This reverts commit cede455a as these changes are no longer needed.
788ad055 -
Antoine Lambert authored
This class is used in the deposit CLI and should be usable without the server part of swh-deposit installed.
-
Antoine Lambert authored
Numerous large tarballs stored in production azure blob storage fail to be downloaded as the default connection timeout of 20 seconds is reached and thus downloads are aborted, so bump azure connection timeout to a larger value. Related to #4654.
-
Antoine Lambert authored
-
Antoine Lambert authored
Bump development tools: mypy, codespell, isort, ... Move all tools configuration in pyproject.toml. Remove no longer needed mypy overrides.
-
Antoine Lambert authored
-
Antoine Lambert authored
Use importlib.* equivalents instead.
-
This was used at the time we were building debian packages for swh components but we no longer do that.
-
Antoine Lambert authored
Add a new private Web API endpoint to get a list of URLs for downloading the tarballs uploaded with a deposit. In development or docker mode, the tarballs are stored in the local filesystem and served by django. In production mode, the tarballs are stored in an azure blob storage and temporary download links with a shared access signature are generated when requesting the endpoint. It enables to move costly operations related to downloading and processing tarballs in celery workers instead of letting the deposit server performing those tasks. Related to #4657 and #4658.
-
Antoine Lambert authored
Checking deposit archives can be a costly operation as the checker must download the archives to list their content. It has been observed in production that if a large archive has been uploaded with a deposit, requesting the check endpoint of the private deposit API can end up with gunicorn worker being killed as the time to download the archive exceeds the worker timeout. So instead of using the private API endpoint performs the checks, prefer to move these operations in the celery worker executing the check-deposit task. Fixes #4658.
-
Antoine Lambert authored
Ensure azure blob storage do not serve uploaded tarballs with gzip encoding as they are usually already compressed and uncompressed tarballs with wrong extensions (.tgz instead .tar) are erroneously detected as gzip encoded by django-storages due to the use of the mimetypes Python module. Fixes #5589.
Showing
- .copier-answers.yml 11 additions, 0 deletions.copier-answers.yml
- .git-blame-ignore-revs 4 additions, 3 deletions.git-blame-ignore-revs
- .gitignore 11 additions, 21 deletions.gitignore
- .pre-commit-config.yaml 30 additions, 15 deletions.pre-commit-config.yaml
- CODE_OF_CONDUCT.md 1 addition, 1 deletionCODE_OF_CONDUCT.md
- MANIFEST.in 0 additions, 12 deletionsMANIFEST.in
- README.rst 82 additions, 1 deletionREADME.rst
- README.rst 82 additions, 1 deletionREADME.rst
- docs/.gitignore 0 additions, 1 deletiondocs/.gitignore
- docs/Makefile 1 addition, 1 deletiondocs/Makefile
- docs/README.rst 1 addition, 71 deletionsdocs/README.rst
- docs/README.rst 1 addition, 71 deletionsdocs/README.rst
- docs/api/metadata.rst 1 addition, 1 deletiondocs/api/metadata.rst
- docs/api/register-account.rst 5 additions, 0 deletionsdocs/api/register-account.rst
- docs/index.rst 9 additions, 1 deletiondocs/index.rst
- docs/specs/protocol-reference.rst 1 addition, 1 deletiondocs/specs/protocol-reference.rst
- docs/specs/spec-loading.rst 296 additions, 149 deletionsdocs/specs/spec-loading.rst
- docs/specs/spec-meta-deposit.rst 2 additions, 2 deletionsdocs/specs/spec-meta-deposit.rst
- mypy.ini 0 additions, 46 deletionsmypy.ini
- pyproject.toml 101 additions, 1 deletionpyproject.toml
.copier-answers.yml
0 → 100644
MANIFEST.in
deleted
100644 → 0
README.rst
deleted
120000 → 0
README.rst
0 → 100644
docs/README.rst
deleted
100644 → 0
docs/README.rst
0 → 120000
This diff is collapsed.
mypy.ini
deleted
100644 → 0