-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reorganize telemetry monitor code into subpackage #12
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.
Just some comments for error handling!
# it is possible to read the manifest prior to a completed | ||
# write due to no access locking mechanism. log the issue | ||
# and continue. it will retry on the next event loop iteration | ||
manifest = RuntimeManifest.load_manifest(manifest_path) |
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.
In def process_manifest
: you catch both a JSONDecodeError
and a ValueError
but return from the function, do you want to allow the program to continue if manifest.py
raises a ValueError
or JSONDecodeError
?
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.
So far.... yes. The occurrence of these partial read/write issues has been pretty much non-existent, but they have occurred. I don't need to kill the telemetry monitor for it, I just need to let it wait to try reading the file again on the next iteration of the "event loop."
You might be thinking that I've set myself up for a forever-fail-loop by letting it just repeat attempts to read a bad file. This is totally a valid point, but unlikely in practice. The file is machine-written, so I'm pretty confident in the json serialization.
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.
ah I see I see
add key manager and supporting tests [ committed by @ankona ] [ reviewed by @MattToast @al-rigazzi ]
reorganize code into a telemetry subpackage