-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve logging successful and failed acquire runs #177
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
- Coverage 44.36% 43.64% -0.72%
==========================================
Files 26 26
Lines 3316 3345 +29
==========================================
- Hits 1471 1460 -11
- Misses 1845 1885 +40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
log.error("Exiting with status code 1 (FAILURE)") | ||
sys.exit(1) | ||
|
||
|
||
def main() -> None: | ||
parser = create_argument_parser(PROFILES, VOLATILE, MODULES) | ||
args, rest = parse_acquire_args(parser, config=CONFIG) | ||
|
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.
Does the GUI still work?
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.
Yes it still works :)
@@ -291,8 +295,7 @@ def check_and_set_acquire_args( | |||
|
|||
# If initialization of the plugin fails, a ValueError is raised | |||
upload_plugin = upload_plugin_cls(**args.config) | |||
|
|||
setattr(args, "upload_plugin", upload_plugin) | |||
setattr(args, "upload_plugin", upload_plugin) |
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.
why is this set two times?
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.
It needs to be set (and set to a default value), as the auto upload code checks on this parameter. The auto upload code is run in a separate try ... except
from the check around setting parameters and acquiring, so it can't be sure is has been set (or set to a proper upload plugin) as that may be the thing that failed.
log.error("Upload %s FAILED. See log file for details.", paths) | ||
GUI().message("Upload failed.") | ||
log.exception("") | ||
log.error('Upload FAILED for files: "%s". See log file for details.', " ".join(map(str, paths))) |
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.
Why is the GUI message removed 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.
Because it is already displayed in main()
I didn't want to add extra GUI dependencies in these functions.
0337473
to
54cccbb
Compare
No description provided.