-
Notifications
You must be signed in to change notification settings - Fork 6
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
Disable reporter by default #395
Conversation
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 thanks @andre-merzky.
With the second thought, I think In the RP examples when we create reporter outside of RP - it is unexpected to have an argument to enable it explicitly. But having reporter inside RP it is on us to integrate it properly, thus inside def __init__(self, name, ns=None, path=None, targets=None, enabled=True):
env_report = ru_get_env_ns('report', ns)
if env_report is not None:
env_report = str(env_report).lower()
if env_report in ['0', 'false', 'off']:
self._enabled = False
else:
self._enabled = True
else:
self._enabled = bool(enabled) |
[edited after re-reading your comment] I don't think that an env variable should overwrite an explicit argument - that is different from what I would expect, and is different from what we do in other places (logger, profiler, other reporter arguments). So we would need to pass an argument flag to the (primary) session. Which is, well, ok, but I am not a fan of adding more flags and switches. Unless we allow to pass a full reporter instance to the session instead of constructing it ourself. |
my proposal was about considering that that input argument is a default value (
sorry, this one I didn't understand. I thought if to have such input argument, then we would need to update Reporter creation in just this method https://github.com/radical-cybertools/radical.pilot/blob/devel/src/radical/pilot/session.py#L1073-L1083 with p.s. anyway I don't want to push it further, just it looks less intuitive for user (i.e., creating an instance of |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #395 +/- ##
=======================================
Coverage 61.69% 61.69%
=======================================
Files 61 61
Lines 6837 6840 +3
=======================================
+ Hits 4218 4220 +2
- Misses 2619 2620 +1 ☔ 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.
LGTM! Thanks, Andre!
p.s. I've added couple comments just for a small cleanup, you can skip them if you want
This fixes #394