Skip to content
Snippets Groups Projects
  1. Mar 21, 2025
  2. Mar 04, 2025
  3. Feb 26, 2025
    • Antoine Lambert's avatar
      checker: Remove private API endpoint and do checks on celery worker · 46e2c7b6
      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.
      v2.4.0
      46e2c7b6
    • Antoine Lambert's avatar
      api/private: Add endpoint to get download links of uploaded tarballs · 6141f333
      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.
      6141f333
    • Antoine Lambert's avatar
      tests: Remove no longer needed pytest custom marker named db · d994ff6d
      Antoine Lambert authored and Antoine Lambert's avatar Antoine Lambert committed
      This was used at the time we were building debian packages for
      swh components but we no longer do that.
      d994ff6d
    • Antoine Lambert's avatar
      deposit: Remove use of deprecated pkg_resources package · d5f23643
      Antoine Lambert authored
      Use importlib.* equivalents instead.
      d5f23643
  4. Feb 17, 2025
  5. Jan 13, 2025
  6. Jan 08, 2025
  7. Dec 09, 2024
  8. Dec 04, 2024
  9. Dec 03, 2024
  10. Dec 02, 2024
  11. Nov 29, 2024
  12. Nov 19, 2024
    • Antoine Lambert's avatar
      loader/tasks: Prevent side effect due to django when module is imported · 54288bed
      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.
      54288bed
    • Antoine Lambert's avatar
      cli/client: Fix commands execution by ensuring django is initialized · cede455a
      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.
      cede455a
  13. Nov 14, 2024
  14. Nov 13, 2024
  15. Nov 06, 2024
  16. Oct 21, 2024
  17. Oct 10, 2024
  18. Sep 25, 2024
  19. Aug 30, 2024
  20. Aug 27, 2024
  21. Aug 09, 2024
  22. May 22, 2024
  23. May 15, 2024
  24. Apr 29, 2024
  25. Apr 17, 2024
    • vlorentz's avatar
      Save DepositRequest record before scheduling loading · 2d68abb1
      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.
      v2.2.1
      2d68abb1
  26. Mar 28, 2024
  27. Feb 05, 2024
  28. Feb 02, 2024
  29. Jan 24, 2024
Loading