-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix(telemetry): Enable telemetry on windows #7389
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
70870a4
Update spawn options and argv processing for windows
Josh-Walker-GM 109bcc8
Merge branch 'main' into jgmw-telemetry-improvise
Josh-Walker-GM 12b5ec9
comment typo
Josh-Walker-GM 37adbba
Merge branch 'jgmw-telemetry-improvise' of github.com:redwoodjs/redwo…
Josh-Walker-GM 630eaea
Merge branch 'main' into jgmw-telemetry-improvise
Josh-Walker-GM 5267060
Merge branch 'main' into jgmw-telemetry-improvise
Tobbe 5123ddd
Merge branch 'main' into jgmw-telemetry-improvise
Tobbe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 realize this package already used
os.type
, but the rest of the codebase seems to useprocess.platform
. Any benefit of using one or the other?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.
Not immediately aware of anything specific other than if we use
process.platform
it would be one less require? @cannikin had a specific reason behind this choice?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 probably didn't realize there even was a
process.platform
! Is there anything else telemetry uses from thatos
lib that isn't available throughprocess
?Also the strings that
process.platform
returns may be different than what's returned byos
? We would want to either convert them to be the same, or update the existing entries in the telemetry database to match, so we don't have different strings for the same platform.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 think that
os
is only used for the is windows conditionals.The actual payload that's sent as telemetry is constructed from data from the
envinfo
package. That would mean no changes to the actual payload and so no data discontinuities. Unless I'm mistaken?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.
Sweet! Yeah let's axe it.
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 found this https://stackoverflow.com/a/61744810/88106
Seems to suggest
os.type()
might be more reliable in VMsThere 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 node docs https://nodejs.org/api/os.html#osplatform for
os.platform()
state that "The return value is equivalent to process.platform."Although not sure if that SO comment was highlighting that that isn't reliable when operating in VMs.
EDIT: I guess we could just leave it as
os.type()
. It's worked this long without issues and it appears from the docs that Tobbe's right about being more reliable on VMs.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.
Turns out I was a genius all along! 😅