sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.29k forks source link

Getting anonymous feedback from instances that should have authenticated users #4772

Open christinaforney opened 5 years ago

christinaforney commented 5 years ago

We have been getting quite a few pieces of anonymous feedback from customer instances that should have all users authenticated.

Examples:

dadlerj commented 5 years ago

@christinaforney can you point to other survey results from the same instances that did come back authenticated?

The way HubSpot works is that it won't tag a user to a response unless they have a valid email address. So, depending on the type of authentication that the customer is using, it's possible that their SSO doesn't populate the user records with emails (and, instead, only usernames).

When I look at those responses you linked, I see the "is authenticated" flag (which is sent from the customer's Sourcegraph instance, not assigned by HubSpot) equals true, but they have no corresponding email. This means that the users are signed in, but that HubSpot didn't receive an email address.

So going back to my question at the top — if you can point to other survey responses from the same instance that DO have associated emails, then there would be inconsistency, and probably a bug. If not, that's just the unfortunate result of the SSO they're using, and we'd have to think a bit more creatively about how to fix this.

christinaforney commented 5 years ago

Here is one from June 25th that has an email:

Vs. one from same instance from July 1st that does not:

dadlerj commented 5 years ago

I don't see an obvious issue in the code here, and I can't repro. @beyang, next time you're on a call with our POC at https://app.hubspot.com/contacts/2762526/company/464956351, could you pull me in for a minute to ask whether he can check out the survey responses site-admin page? I'd love to know if they can see a user associated with the response that doesn't have an email address in our system.

beyang commented 5 years ago

@dadlerj I can just shoot them an email. Is this the page they should check? https://sourcegraph.sgdev.org/site-admin/surveys

Also, I see you referenced https://app.hubspot.com/contacts/2762526/company/464956351, but is that one of the customers affected by this? (Didn't see it in the links @christinaforney pasted above.)

dadlerj commented 5 years ago

Confirmed that https://app.hubspot.com/forms/2762526/a86bbac5-576d-4ca0-86c1-0c60837c3eab/submissions/3e89443c-f97e-4440-bf5e-c123652449fa (from https://app.hubspot.com/contacts/2762526/company/407948923) came in appearing anonymous because the customer's http-header authentication doesn't provide email addresses to Sourcegraph — only usernames.

This is tough — we could send the username through with the survey results, in place of an email, but the username alone wouldn't tell us much, since there'd be no company/domain associated with it.

Rather, for now, I'll just see if I can build a hardcoded mapping in HubSpot (from anonymous ID to company) where we know it, and use that to enhance how it appears in the list of results.

dadlerj commented 5 years ago

Confirmed with the customer above that the user who submitted the survey that came in anonymously also doesn't have an email address (which is strange given that other users on their system do. Perhaps missing from their SSO? Or perhaps the user deleted it themself?).

I'll leave this issue open, but use it for tracking the task I described for myself above.

christinaforney commented 5 years ago

Sounds good. Thanks for figuring it out!