-
Notifications
You must be signed in to change notification settings - Fork 41
feat(notification): add Python runtime version information to device data #179
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
Conversation
tobyhs
left a comment
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.
The code looks fine, but I haven't had too much time to check why the build is failing and if its related.
I pushed a branch to trigger a build and that passed, so there is a chance that it is related to the changes (but I'm not seeing it yet).
bugsnag/configuration.py
Outdated
| else: | ||
| self.hostname = None | ||
|
|
||
| self.runtime_versions = {"python": str(platform.python_version())} |
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.
As far as I know, platform.python_version() returns a string; is there a particular reason you're using str 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.
Ah, I misread the docs when it said defaults to 0 for patch version.
TBH, it was an optimistic addition to try and resolve the build failures. I thought it was happening on Travis for py34 only, but the build history seems to suggest these failures are randomly happening but only on this branch.
They are all TypeError: string indices must be integers errors when examining the payload. However I cannot see how adding a new field to the dict should cause this. I might need to dig into the FilterDict code to see if this is somehow causing some unexpected changes to the structure.
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.
I can't tell if you were planning on removing the str call or not.
tobyhs
left a comment
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 as a re-build passed
…data adds version string (from platform.python_version()) to device.runtimeVersions.python payload
ee7d5b1 to
6eabaf6
Compare
tobyhs
left a comment
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
adds version string (from platform.python_version()) to device.runtimeVersions.python payload
Goal
Augments reporting with the version of Python in use when an event occurred in case of issues in a specific Python version.
Design
Added data to device.runtimeVersions.python as per other notifiers.
Changeset
Changed
platform.python_version()on initnotificationandsessiontrackeruse this data in their payloadsTests
Review
For the submitter, initial self-review:
For the pull request reviewer(s), this changeset has been reviewed for: