-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix exporter; bring up-to-date; add flake8 #3
Conversation
The upstream-website seems to have changed the format in which they provide this value. After changing it to a float the exporter works for me again like expected.
6842562
to
e24684b
Compare
The usage did error for me because of the format --web.listen-address seems to expect -- I assume that comment was out of date. The relative import did only work when I then run the project from the directory in which main.py is, not from the root of the repository.
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!
A few nits here and there, but no blockers.
I do recommend looking into the change in behavior on listen address.
group = parser.add_argument_group() | ||
group.add_argument( | ||
'-w', '--web.listen-address', | ||
type=str, | ||
dest='listenaddress', | ||
help='Address and port to expose metrics and web interface. Default: ":9184"\n' | ||
'To listen on all interfaces, omit the IP. ":<port>"\n' | ||
'To listen on all interfaces, omit the IP: ":<port>"\n' |
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.
IIRC, this behavior recently changed...
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.
Dang it, I forgot about that.
I would follow the eaton-ups-exporter and change it to 0.0.0.0
The existing CI workflow file did never run. 3.6 from before made problems during CI.
Thanks, I added your suggestions and changed the default address to |
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.
There's some mixup around 0.0.0.0
vs 127.0.0.1
and what behavior actually changed upstream.
If you have questions, just ask. :-)
@@ -27,7 +27,7 @@ def main(): | |||
else: # listen on all interfaces |
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.
This is the behavior that changed upstream.
IIRC, the old behavior was to listen on all interfaces if it's not specified. Now it's 127.0.0.1.
I'm not certain though, so you should check into that.
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.
We talked and the changes around this will be addressed in another PR.
The exporter did error, possibly because the website queried changed a value from int to float.
Another bug I noticed was that a script for CI was added before, but never triggered.
Changes:
wind_power
to float