-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle setting subscriber nameserver to False #159
Conversation
Codecov Report
@@ Coverage Diff @@
## main #159 +/- ##
=======================================
Coverage 95.36% 95.37%
=======================================
Files 13 13
Lines 2652 2700 +48
=======================================
+ Hits 2529 2575 +46
- Misses 123 125 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactor along the way. Some minor things and tests missing, otherwise the logic looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I left some comments on how tests and documentation could be improved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much to say, looks pretty good to me :)
It is possible to disable Posttroll Nameserver usage for the incoming | ||
messages by starting ``satpy_launcher.py`` with command-line arguments | ||
``-n False -a tcp://<host>:<port>`` where the host and port point to a | ||
message publisher. Multiple publisher addresses can be given by supplying | ||
them with additional ``-a`` switches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question here: Is this the same interface we use in other pytroll modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internally, yes. All the packages using create_subscriber_from_dict_config()
or create_publisher_from_dict_config()
are using the same settings, explained here: https://github.com/pytroll/posttroll/blob/main/posttroll/subscriber.py#L437-L438
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok! but I was actually wondering if the external/command line interface was the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump @pnuu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the incoming messages (subscribers) I found these:
geographic_gatherer.py
uses-n false
and-i tcp://...
, where-i
is "inbound connection" and means the same as-a
does heresegment_gatherer.py
reads these settings from the config file (usingnameservers
andaddresses
option names)
Internally the both use posttroll.subscriber.create_subscriber_from_dict_config()
, so given the same combination the nameserver
handling will be the same. The names used by Posttroll are addresses
and nameserver
.
The -a
and -n
options were present in satpy_launcher.py
already before this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, we'll keep them for now then
…m/pnuu/trollflow2 into feature-listener-nameserver-false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It wasn't possible to disable the subscriber nameserver to
False
. With this PR, the argument parsing takes care of this. Also, the argument parsing and launching of theRunner
have now been moved totrollflow2.launcher
so we could add tests for them.flake8 trollflow2