Page MenuHomeSoftware Heritage

publisher: Simplify publisher initialization and add journal cli
ClosedPublic

Authored by ardumont on Mar 15 2019, 12:10 PM.

Details

Summary

This allows to pass the configuration needed to the publisher.

I extracted that from the current work i'm doing on testing kafka.
That allows to unblock other coming changes needed (impact on
swh-docker-dev, swh-site).

Related T1410

Test Plan

tox

Diff Detail

Repository
rDJNL Journal infrastructure
Branch
new-cli
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4661
Build 6195: tox-on-jenkinsJenkins
Build 6194: arc lint + arc unit

Event Timeline

ardumont added inline comments.
swh/journal/tests/test_publisher.py
148

That will be reworked in D1239.

Accepted, but let's not forget to add tests for the CLI

swh/journal/cli.py
76–77

Add an except KeyboardException to exit the loop nicely.

This revision is now accepted and ready to land.Mar 15 2019, 12:22 PM
swh/journal/cli.py
72–73

raise a ClickException instead.

72–73

And reword to: Configuration error: The following keys must be provided: %s

Thanks for the remarks.

Yes, for the test on cli.
I planned to do that but not right now.
My main focus right now is being able to test the kafka layer for now ;)

This revision was automatically updated to reflect the committed changes.