Refactor backend to use only one return code instead of 3#8494
Refactor backend to use only one return code instead of 3#8494justin-stephenson wants to merge 5 commits intoSSSD:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request is a large-scale refactoring to simplify error handling by removing the DP_ERR_* error codes and unifying them into a single error code system. The changes span many files and involve updating function signatures, data structures, and call sites. While the majority of the changes appear correct and consistent with the goal, I've found a few critical issues where function calls were not updated to their new signatures, which will lead to compilation errors. There is also a case where an error return value is no longer checked. These issues need to be addressed before this pull request can be merged.
Note: Security Review did not run due to the size of the PR.
58fb63c to
76bb8cb
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the data provider error handling by removing the DP_ERR_* codes and using a single error code for replies. The changes are extensive and affect many provider implementations. While the refactoring is a good step towards simplification, I've found a recurring critical issue where the actual data provider error code is ignored in several places, potentially leading to silent failures. I've also noted a case where a change in logging reduces the amount of useful information. Please address these points to ensure the refactoring is robust.
76bb8cb to
02debbe
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request is a large-scale refactoring to simplify the data provider's error handling by using a single return code instead of three. The changes are extensive and touch many files, removing the DP_ERR_* error codes and replacing them with a more unified error reporting mechanism. The implementation looks solid and consistent across the codebase. I've found one minor issue in error logging where strerror is used incorrectly, which could lead to unhelpful log messages. My specific comment addresses this.
6898535 to
e853630
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request is a large-scale refactoring to simplify error handling by removing the DP_ERR_* codes and using a single return code. The changes are extensive and touch many files. While the overall direction is good and most changes are correct, I've found a recurring critical issue in several places where an incorrect variable is used for error reporting, which could lead to silent failures. Additionally, there are a couple of minor issues with logging format strings and content that could affect debuggability. I've provided specific comments and suggestions for these issues.
Assisted-By: Claude Code (Sonnet 4.5)
Assisted-By: Claude Code (Sonnet 4.5)
Assisted-By: Claude Code (Sonnet 4.5)
if (err_min == ENOENT) branch was unreachable code, fix this and update to the updated single sssd error return code.
e853630 to
ede7f2b
Compare
Notes:
|
|
@pbrezina Could you review this? |
|
I started working on porting LDAP to the new failover code, and now I understand the implementation of this PR needs to be modified. I will close this for now. |
sssd.dataprovidermethods to single 'output' return code