-
Notifications
You must be signed in to change notification settings - Fork 31
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
Python Mqtt and exception cleanup #1701
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1701 +/- ##
==========================================
+ Coverage 76.31% 76.60% +0.28%
==========================================
Files 603 608 +5
Lines 46101 46494 +393
Branches 844 844
==========================================
+ Hits 35183 35617 +434
+ Misses 10821 10780 -41
Partials 97 97
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Please restore ssl parameter. If only ssl parameter is given, you can pull Ca file if necessary from ENV['SSL_CERT_FILE']
@@ -91,12 +92,11 @@ module OpenC3 | |||
class MqttInterface < Interface | |||
# @param hostname [String] MQTT server to connect to | |||
# @param port [Integer] MQTT port | |||
# @param ssl [Boolean] Use SSL true/false | |||
def initialize(hostname, port = 1883, ssl = 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.
Please restore ssl parameter
require 'openc3/interfaces/stream_interface' | ||
require 'openc3/streams/mqtt_stream' | ||
|
||
module OpenC3 | ||
class MqttStreamInterface < StreamInterface | ||
# @param hostname [String] MQTT server to connect to | ||
# @param port [Integer] MQTT port | ||
# @param ssl [Boolean] Use SSL true/false | ||
def initialize(hostname, port = 1883, ssl = false, write_topic = nil, read_topic = nil, protocol_type = nil, *protocol_args) |
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.
restore ssl parameter
@@ -33,27 +33,61 @@ class MqttStream < Stream | |||
attr_accessor :key | |||
attr_accessor :ca_file | |||
|
|||
def initialize(hostname, port = 1883, ssl = false, write_topic = nil, read_topic = nil) |
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.
restore ssl
There is no code which does this. Is this another else case if |
I should be able to use mqtt with a https:// url and not provide anything else. |
Quality Gate passedIssues Measures |
closes #1197
Sorry for the noise in there about the exceptions but I started in on it during MQTT implementation and it all sort of rolled together. I removed the ssl parameter because I don't think it makes sense by itself and only applies if an option is set. That is breaking but this is COSMOS 6 and I think the MQTT usage is pretty low.