Skip to content
Snippets Groups Projects
  1. Nov 27, 2020
  2. Nov 26, 2020
  3. Nov 24, 2020
  4. Nov 23, 2020
  5. Nov 20, 2020
    • Antoine R. Dumont's avatar
      Clarify names around the swh.core.db.pytest_plugin tests · a64357b2
      Antoine R. Dumont authored
      This renames the test file to test_pytest_plugin which is clearer since it
      relates to the actual module being tested.
      
      This also moves the tests into its own dedicated arborescence because that's a
      different module now.
      v0.9.0
      a64357b2
    • Antoine R. Dumont's avatar
      setup: Separate pytest-postgresql dependency and declare it when needed · 7722df9f
      Antoine R. Dumont authored
      This drops the pytest-postgresql from requirements-db.txt. This is not a
      required dependency for the swh.core.db module itself.
      
      It's a requirement for the swh.core.db.pytest_plugin. This module should become
      its own module as a test requirements for other swh modules (including
      swh.core.db but not limited to it).
      
      So this commit adds a dedicated requirements-db-pytestplugin.txt file with such
      dependency. This opens the db-pytestplugin key within the setup.py and then
      references that test dependency for the swh.core.db modules (as it's needed for
      tests of the module).
      
      Related to T2746
      7722df9f
    • Antoine Lambert's avatar
      RPCClient: Fix reraise_exceptions regression · 4badb90a
      Antoine Lambert authored
      Reraising exceptions in RPCClient was not honored anymore due to a mistake
      introduced in last commit.
      4badb90a
    • Antoine Lambert's avatar
      api/serializers: Add Exception type encoder and decoder · f9619fb1
      Antoine Lambert authored
      An exception can be constructed with another exception argument so handle
      that special case by adding a dedicated encoder and decoder to avoid remote
      exception serialization error.
      f9619fb1
  6. Nov 19, 2020
  7. Oct 30, 2020
  8. Oct 29, 2020
    • Tenma's avatar
      core tests: disambiguate arg 'request' through typing · 12fa6f26
      Tenma authored
      Both requests.Request and _pytest.FixtureRequest objects are passed to
      test fixtures as argument 'request'. This hurts readability.
      Adding typing annotations makes it clear which one is meant.
      12fa6f26
  9. Oct 28, 2020
  10. Oct 23, 2020
  11. Oct 22, 2020
  12. Oct 21, 2020
  13. Oct 19, 2020
  14. Oct 07, 2020
  15. Oct 02, 2020
    • Antoine R. Dumont's avatar
      config: Deprecated SWHConfig in favor of load_from_envvar function · 82a47667
      Antoine R. Dumont authored
      That new function declares exactly what happens today during our configuration
      loading (for loader/lister/indexer/... and rpc services in general not for the
      CLIs which will be dealt with later).
      
      Loads and parses the yaml configuration file out of the SWH_CONFIG_FILENAME
      environment variable. Allowing eventual dict enrichment with default
      configuration if provided.
      
      Related to T1532
      v0.4.0
      82a47667
  16. Sep 30, 2020
    • vlorentz's avatar
      SortedList: Don't inherit from UserList. · d230cb3d
      vlorentz authored
      A class should only inherit from UserList if the type of data it presents is
      the same as the data in the 'data' attribute, which isn't true here.
      
      This means, for example, that SortedList.__contains__ checked if the value
      is in self.data, which always returns False (unless unlucky, but then it
      returns True while it shouldn't).
      
      By removing this inheritance, methods that are no longer implemented no longer
      default to a buggy implementation.
      v0.3.1
      d230cb3d
  17. Sep 25, 2020
    • Nicolas Dandrimont's avatar
      Add specific celery task arguments to metadata sent to systemd-journald · d46d4c7a
      Nicolas Dandrimont authored
      We used to log all task arguments, which was a bit too much for the logging
      pipeline to handle. Now that a lot of tasks arguments have been "canonicalized",
      we can go back to logging some specific arguments directly.
      
      Use the opportunity to drop an unused argument and improve the documentation of
      these logging-related functions.
      d46d4c7a
  18. Sep 23, 2020
  19. Sep 22, 2020
    • Antoine R. Dumont's avatar
    • Antoine Lambert's avatar
      bfca0a8d
    • David Douard's avatar
      Do not automagically add click cmd from swh.cli.subcommands · 08788aa3
      David Douard authored
      the idea is now to be a bit more explicit, and expect thoses commands
      to have the main `swh` click group as parent.
      
      Then the swh.cli.subcommands entrypoint hooks only have to load the
      declared cli modules.
      
      So we now expect to:
      
      - use swh.core.cli.swh as parent group when declaring
        sub-groups/commands in a swh package.
      - the swh.cli.subcommand entrypoint to only refer the module rather than
        the click group/command, ie. have:
      
        '''
          [swh.cli.subcommands]
          name = swh.path.to.cli_module
        '''
      
        instead of:
      
        '''
          [swh.cli.subcommands]
          name = swh.path.to.cli_module:click_command
        '''
      
      A backward compatilibility mech is provided: if the loaded entrypoint
      object is indeed a click command, auto add it to the main swh group.
      08788aa3
    • David Douard's avatar
      Split db-init cli in 2 (init and create) and move them under 'swh db' · 56d505f3
      David Douard authored
      The idea it to have the 'swh db create' command to create the database
      and prepare it by executing SQL -superuser- files, i.e. SQL files which
      execution requires superuser permissions -- typically install languages
      or extensions.
      
      Then the 'swh db init' execute the initialization SQL files that do not
      require superuser permissions.
      
      Also get rid of the previous (unused) 'swh db init' command.
      56d505f3
  20. Sep 18, 2020
  21. Sep 17, 2020
Loading