-
Notifications
You must be signed in to change notification settings - Fork 792
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
Bootlaoder reliability #600
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #600 +/- ##
===========================================
+ Coverage 56.72% 56.83% +0.10%
===========================================
Files 112 115 +3
Lines 3820 3869 +49
===========================================
+ Hits 2167 2199 +32
- Misses 1653 1670 +17
Continue to review full report at Codecov.
|
@@ -17,7 +17,7 @@ def parse_bootloader_telem(telem: Dict) -> bool: | |||
telem['os_version'] = "Unknown OS" | |||
|
|||
telem_id = BootloaderService.get_mongo_id_for_bootloader_telem(telem) | |||
mongo.db.bootloader_telems.update({'_id': telem_id}, telem, upsert=True) | |||
mongo.db.bootloader_telems.update({'_id': telem_id}, {'$setOnInsert': telem}, upsert=True) |
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.
What do you think about logging if something already exists?
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.
Log would be redundant, because we expect this to happen 100% of the time
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.
Approved, but see my comment
Pyinstaller seems to launch bootloader two times. The second launch seems to error on command launching function/functions and thus gives less information about the machine.
Changes code to only store the first bootloader telem instead of overriding it with the incomplete second one.