-
Notifications
You must be signed in to change notification settings - Fork 643
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
UserAgentParser parsing #10114
UserAgentParser parsing #10114
Conversation
("NuGet+VS+VSIX/4.8.1+(Microsoft+Windows+NT+10.0.17134.0,+VS+Enterprise/15.0)", "NuGet VS VSIX", "4", "8", "1"), | ||
("NuGet+Command+Line/4.3.0+(Microsoft+Windows+NT+6.2.9200.0)", "NuGet Command Line", "4", "3", "0"), | ||
("Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.19045; en-US) PowerShell/7.2.9", "PowerShell Core", "7", "2", "9"), | ||
("Xamarin Updater (Platform: osx-13.1.0) (Application: Visual Studio Community) (Version: 17.4.5 (build 8))", "Xamarin Updater", "17", "4", "5"), |
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.
Could you add test for '(Linux 5.18.0-14.2-liquorix-amd64 #1 ZEN SMP PREEMPT_DYNAMIC liquorix 5.18-16ubuntu1~jammy (2022-0)'
which has unmatched parenthesis? See more context:
https://github.com/NuGet/NuGet.Client/pull/4991/files
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.
What would you expect the result to be here? Parsing returns Other, None bc there's no user agent specified here and none of the regexes we have match it. This is the same on the current parsing codebase too. Unmatched parentheses aren't the issue, it's the missing user agent string.
Also, the code here just is to extract the user agent info, not the OS info; that's done by the ImportAzureCdnStatistics job, which isn't affected by this and will continue to use the .NET code.
A building block for https://github.com/NuGet/Engineering/issues/5082
Adds support for custom user agent parsing based on the LogInterpretation library