Skip to content
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

Pull user login/name from pusher field when sender is nil #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kerrizor
Copy link
Contributor

Some payloads come in that are missing a sender field for one reason or another, but they do seem to have a pusher field, which has a name field that is the same as the ['sender']['login'] value.

This isn't a common issue, but a persistent one, always buzzing in the background of .org and .com.

https://sentry.io/travis-ci/org-listener-production/issues/587467865/
https://sentry.io/travis-ci/com-listener-production/issues/562523767/

I assume that these are valid build requests; nothing in the payloads I snagged via logging I put into place earlier today (in #45) appear to be invalid, just missing the sender value for whatever reason. Cruising through :octocat: API docs, I can't see any v3 API events that don't have a sender field, but the data simply isn't there. A few DO call out that pusher is expected in the payload as well, and contains a different, less-rich version of the sender data, which implies it might be some legacy API is pushing events at us. Since all we want/need it the login or name value, this seems like a small patch to cover ourselves in this case.

Some payloads come in that are missing a `sender` field for one reason
or another, but they do seem to have a `pusher` field, which has a
`name` field that is the same as the ['sender']['login'] value.
@kerrizor kerrizor force-pushed the kerrizor/pull-user-login-from-pusher-field-when-sender-is-missing-from-payload branch from b62ffb4 to 5a342d7 Compare August 15, 2018 23:46
@joshk
Copy link
Contributor

joshk commented Aug 16, 2018

Can we also escalate this to GitHub to understand if this is a bug on their end or a use case we need to handle long term?

@@ -179,6 +179,7 @@ def event_details
rescue => e
error("Error logging payload: #{e.message}")
error("Payload causing error: #{decoded_payload}")
error("Original payload causing error: #{payload}")

This comment was marked as spam.

# or another, but they do seem to have a `pusher` field, which has a
# `name` field that is the same as the ['sender']['login'] value.
#
def self.parse_sender_from(payload)

This comment was marked as spam.

This comment was marked as spam.

@vitalied vitalied force-pushed the master branch 3 times, most recently from a8db366 to dc6e06b Compare August 24, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants