Skip to content
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

🐛 Ensure asset platform is not nil in sysinfo. #3974

Closed
wants to merge 1 commit into from

Conversation

preslavgerchev
Copy link
Contributor

No description provided.

Copy link
Contributor

Test Results

2 989 tests  ±0   2 988 ✅ ±0   1m 22s ⏱️ -10s
  329 suites ±0       1 💤 ±0 
   23 files   ±0       0 ❌ ±0 

Results for commit 0e8044d. ± Comparison against base commit f7e7764.

This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.
go.mondoo.com/cnquery/v11/llx ‑ TestSuccess/2024-05-13_08:24:19.335536687_+0000_UTC_m=+0.014999175
go.mondoo.com/cnquery/v11/llx ‑ TestTruthy/2024-05-13_08:24:19.335536687_+0000_UTC_m=+0.014999175
go.mondoo.com/cnquery/v11/llx ‑ TestTruthy/2024-05-13_08:24:19.335536687_+0000_UTC_m=+0.014999175#01
go.mondoo.com/cnquery/v11/llx ‑ TestSuccess/2024-05-13_09:45:23.273053094_+0000_UTC_m=+0.007682991
go.mondoo.com/cnquery/v11/llx ‑ TestTruthy/2024-05-13_09:45:23.273053094_+0000_UTC_m=+0.007682991
go.mondoo.com/cnquery/v11/llx ‑ TestTruthy/2024-05-13_09:45:23.273053094_+0000_UTC_m=+0.007682991#01

@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2024
@preslavgerchev preslavgerchev marked this pull request as ready for review May 13, 2024 18:38
sysInfo.Platform = platform
// FIXME: if IdentifyPlatform returns an err, we get a nil platform this will cause a nil pointer dereference in the next step (hostname)
// FIXME: we should ensure IdentifyPlatform's error is handled properly
if platform == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to gracefully handle the case that we cannot retrieve the sys info. While not optimal, we should not stop execution when we cannot determine the host platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am closing this PR as it's not needed anymore for the use case it was trying to fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants