Skip to content
Snippets Groups Projects
  1. Mar 31, 2025
  2. Mar 21, 2025
  3. Mar 04, 2025
  4. Feb 26, 2025
  5. Feb 17, 2025
  6. Jan 13, 2025
  7. Jan 08, 2025
  8. Dec 09, 2024
  9. Dec 04, 2024
  10. Dec 03, 2024
  11. Dec 02, 2024
  12. Nov 29, 2024
  13. 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
  14. Nov 14, 2024
  15. Nov 13, 2024
  16. Nov 06, 2024
  17. Oct 21, 2024
  18. Oct 10, 2024
  19. Sep 25, 2024
  20. Aug 30, 2024
  21. Aug 27, 2024
  22. Aug 09, 2024
  23. May 22, 2024
  24. May 15, 2024
  25. Apr 29, 2024
  26. 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.
  27. Mar 28, 2024
  28. Feb 05, 2024
  29. Feb 02, 2024
Loading