fix broken analytics tracking introduced in #1507 & changed default - #1529
Conversation
0c4c9e5 to
d10f0ef
Compare
|
I've been thinking about what the default should be for the case of "if no specified value, no stored value, and can't prompt for one". This is most likely in a CI environment (e.g. all Travis CI's test runs), and we probably don't want this case to pollute our data. I changed the default to false and updated the PR. |
|
@sheerun since you mentioned calling commands in programmatic API, I realized that we could have a non-CI scenario that's also non-interactive. I plan to change the default |
|
Just please add the tests |
|
Are you sure you want to check for CI in analytics.js? Isn't check for |
|
How do tools like Webstorm integrate bower? I assume that would be an environment where process.env.CI = null and interactive = false? |
|
I think the environment should be irrelevant when calling bower via programmatic API. Also, currently analytics is enabled when interactive = false. We probably want to track WebStorm? |
Yes you're right. Let's not check for CI in analytics.js.
Yes latest bower version enables analytics when interactive = false. This should enable analytics in WebStorm unless manually disabled. But this also enables analytics for CI environments. Do you think if it'll be an issue? |
|
Well, we can't distinguish WebStorm from programmatic API on CI without checking CI env variable. I don't know what to do. It's getting more and more complicated. |
d10f0ef to
e802b87
Compare
|
I addressed your inline concerns. This still doesn't address cases when someone pass conflicting values and pass different values at different times, however that wasn't addressed previously either. I'd like to get this patch in because we're loosing valuable data. To address the last concerns, I propose we introduce a new config option in Insight called |
|
I think we should leave analytics only for interactive sessions. It solves a lot of issues. |
|
Agreed, this is the case now that we defaulted |
|
I'll fix this PR and tests soon. |
|
@rayshan Mind to log in to IRC? |
e802b87 to
48fe9be
Compare
|
@rayshan Please review |
There was a problem hiding this comment.
would it be more clear if we check for undefined since that's what the value actually is if not set? i know this works, just for clarification
|
@rayshan Could you review my code? |
|
@sheerun hi, I did already, please see inline comments. I think the biggest issue is checking for |
48fe9be to
4656021
Compare
|
@rayshan I fixed your commit again. Sorry I didn't see your feedback. |
|
@sheerun no prob, it's properly working now, ready to merge. Thanks for all the help on this. I'll let you merge in in the order you prefer. |
fix broken analytics tracking introduced in #1507 & changed default
This may not be the most elegant approach but it does fix tracking issue.