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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.