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