Page MenuHomeSoftware Heritage

cli: rename a admin cli commands
ClosedPublic

Authored by douardda on May 22 2019, 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
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5882
Build 8059: tox-on-jenkinsJenkins
Build 8058: arc lint + arc unit

Event Timeline

douardda created this revision.May 22 2019, 2:39 PM
ardumont requested changes to this revision.May 23 2019, 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.May 23 2019, 9:41 AM
douardda updated this revision to Diff 5096.Jun 5 2019, 2:43 PM

rebase + fix typo

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