Page MenuHomeSoftware Heritage

cli: rename a admin cli commands
ClosedPublic

Authored by douardda on Wed, May 22, 2:39 PM.

Details

Summary

use more imperative-like command names.
Aliases are used to keep old commands working.

Also add an explicit deprecation message in swh-scheduler's help message.

$ swh scheduler
Usage: swh scheduler [OPTIONS] COMMAND [ARGS]...

  Software Heritage Scheduler tools.

  Use a local scheduler instance by default (plugged to the main
  scheduler db).

Options:
  -C, --config-file FILE  Configuration file.
  -d, --database TEXT     Scheduling database DSN (imply cls is
                          'local')
  -u, --url TEXT          Scheduler's url access (imply cls is
                          'remote')
  --no-stdout             Do NOT output logs on the console
  -h, --help              Show this message and exit.

Commands:
  rpc-serve        Starts a swh-scheduler API HTTP server.
  start-ghtorrent  Starts a ghtorrent consumer service.
  start-listener   Starts a swh-scheduler listener service.
  start-runner     Starts a swh-scheduler runner service.
  start-updater    Starts a scheduler-updater service.
  task             Manipulate tasks.
  task-type        Manipulate task types.

Diff Detail

Repository
rDSCH Scheduling utilities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Wed, May 22, 2:39 PM
ardumont requested changes to this revision.Thu, May 23, 9:41 AM
ardumont added a subscriber: ardumont.

For the sake of the typo on the backward compatibility.

Otherwise, sounds good!

swh/scheduler/cli/admin.py
129

listener

This revision now requires changes to proceed.Thu, May 23, 9:41 AM
douardda updated this revision to Diff 5096.Wed, Jun 5, 2:43 PM

rebase + fix typo

ardumont accepted this revision.Wed, Jun 5, 3:22 PM
This revision is now accepted and ready to land.Wed, Jun 5, 3:22 PM
This revision was landed with ongoing or failed builds.Thu, Jun 13, 9:29 AM
This revision was automatically updated to reflect the committed changes.