-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Make the name of the client property in config files more generic. #3071
Conversation
My only worry would be someone deciding to change the value without realizing how it's used and breaking all our Tracks events. Plus, |
We sure wouldn't want to break all our Tracks events. Do you think the worry there makes it worth adding a new config item that duplicates the values in the current property? Or should we trust people not to blindly change values without considering the ramifications? I'm not married to |
This lets us reuse the value in places besides its current use in Tracks without just using the Tracks-specific name, which would ultimately become confusing and inaccurate.
4ecd891
to
86014ff
Compare
I've updated to use We could add a new config item if we really want to be safe, but it seems to me like overkill and redundant redundancy. @mjangda what do you think? |
Chatted with @robfelty from the data team a bit about this in Slack, and he didn't seem too worried about the risk. |
I think this is fine. Code looks good. Makes me wish even more for something like JSON+Comments or YAML for config files. Might rebase this, as it has a pretty old base? |
Code works. Assuming the rebase is clean, 🚢 |
Make the name of the client property in config files more generic.
This lets us reuse the value in places besides its current use in Tracks without just using the Tracks-specific name, which would ultimately become confusing and inaccurate.
The use case that led me to propose this change is that we'd like to be able to send information to the REST API about the client software when fetching information about live chat, so that we can send back info that will route desktop user chats differently than web user chats. Rather than adding some kind of janky user agent or oauth app id check to the REST API, I'd like to send a parameter along with the request that will tell the API how to respond.
Since this client property already exists, I thought I'd rename it to genericize it rather than adding another property with the same value.
I tested by running loading some screens within the client and confirming that Tracks pings landed with the client event property intact.
Of course, now that I look back at blame for the config files to see who to ping for review, I see that @mjangda made pretty much the exact opposite commit in the pre-oss repo (renaming
client
totracks_client_prop
to be more explicit). Since we now have another use for this property, maybe it's time to be more general now. :)