feat: Improve error handling in host information retrieval#1980
feat: Improve error handling in host information retrieval#1980Dylan-M wants to merge 3 commits intoshirou:masterfrom
Conversation
f08d59b to
0af3298
Compare
41ab37b to
4635e55
Compare
4635e55 to
6ca3796
Compare
shirou
left a comment
There was a problem hiding this comment.
Thank you for the contribution. However, I have some concerns about this PR.
This PR includes two separate changes: modifying the return value behavior of host.InfoWithContext() and introducing host.FDLimitsWithContext() for AIX only.
Regarding FDLimitsWithContext(): We cannot add a function that only runs on a single platform. Any new function must be supported on at least Windows and Linux.
Regarding the return value change in InfoWithContext(): This PR changes the behavior of return values. Previously, InfoWithContext() returned nil as the first value on error, but this PR returns a non-nil (partial) value instead. While I understand the rationale—return values on error are not strictly defined—we would prefer not to change the existing behavior as it could break existing code that relies on the current contract.
Could you please split this into separate PRs, each containing a single change? When a PR contains multiple changes, we may have to reject it entirely even if some parts are acceptable. Smaller, focused PRs are also much easier to review.
931b06b to
ccfa854
Compare
Done. I'll create a separate follow on PR with the file descriptor work. |
ccfa854 to
36846c2
Compare
36846c2 to
af6ff2e
Compare
4bd2913 to
00a05f9
Compare
00a05f9 to
2b648c6
Compare
|
@shirou I've refactored all of my branches to account for the cgo compatible changes you merged in from others. I've now been made one of the platform owners for AIX on OpenTelemetry, and I'd really like to pull all of these changes in so that OTel's hostmetricsreceiver will work correctly. Is there anything I can provide for you to make testing these changes easier? I have a working OTel collector with these changes baked in, and we can probably provide a 1 week rental of an AIX LPAR so you can test in whatever fashion you want. I'm also available to pair if we can find overlapping hours. |
|
Hi @Dylan-M, thank you for your work on improving AIX support — the WPAR/LPAR virtualization detection and the who-based user parsing are great additions. However, this PR still contains several independent changes bundled together, which makes it difficult to review properly:
Each of these has a different scope and risk profile. When they're combined in a single PR, it's hard to evaluate each change on its own merits, and a concern with one part blocks everything else. I'm going to close this PR along with your other open PRs for now, as they share the same issue — the scope of each PR is too broad for us to review with confidence. I want to be upfront: as a maintainer with limited time, I simply cannot give large, multi-concern PRs the thorough review they deserve. Merging changes I haven't fully reviewed wouldn't be fair to you or to the project's users. This is not a rejection of your contributions — I genuinely appreciate the effort you've put in. I'd welcome you to resubmit as smaller, focused PRs. As a general guideline:
I'm happy to discuss how to best split things up if that would be helpful. Thanks for your understanding, and I hope to see your contributions again in a more reviewable form! |
Description
This PR enhances AIX platform support in the host package with improved error handling and better test coverage through dependency injection.
Part 2 of splitting #1969: host package
Depends on #1979
Changes
host/host.go
InfoWithContext()to collect all errors during information gathering instead of returning early on first errornilwitherrors.Join()when any field fails to retrievehost/host_aix.go
testInvokervariable andgetInvoker()functioninvokecalls withgetInvoker()to enable test mockingHostIDWithContext(),BootTimeWithContext(),UptimeWithContext(),UsersWithContext(),PlatformInformationWithContext(),KernelVersionWithContext(), andKernelArch()host/host_aix_test.go
TestBootTimeWithContext()for boot time functionalityBenefits