-
Notifications
You must be signed in to change notification settings - Fork 302
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
[Resources.OperatingSystem] Add a fallback mechanism for build.id
#2047
[Resources.OperatingSystem] Add a fallback mechanism for build.id
#2047
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2047 +/- ##
==========================================
+ Coverage 73.91% 77.20% +3.29%
==========================================
Files 267 3 -264
Lines 9615 136 -9479
==========================================
- Hits 7107 105 -7002
+ Misses 2508 31 -2477
Flags with carried forward coverage won't be shown. Click here to find out more.
|
string? buildIdContent = null; | ||
if (buildId.IsEmpty) | ||
{ | ||
buildIdContent = File.ReadAllText(this.kernelOsRelease!).Trim(); |
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 if kernelOsRelease is null? Should it be verified?
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.
If kernelOsRelease is null, it should be considered a special case. In practice, kernelOsRelease would only be null if constructor used for testing explicitly sets it to null. In default scenarios, it will never be null. Therefore, I don't believe it's necessary to include a check for null in this case.
build.id
in the OS detectorbuild.id
Changes
Add a fallback mechanism for
build.id
in the OS detectorMerge requirement checklist
CHANGELOG.md
files updated for non-trivial changes