I'm breaking the hydrator into separate PRs. This is party to make them easier to review, partly because the commit history on the original PR is pretty messy at this point.
This PR is just for the new commit-server component. In this code, the commit server isn't invoked by anything besides tests, and the k8s manifests are not included in the rendered install manifests.
I've added everyone who helped as a co-author on this PR.
PR Reviewer Guide 🔍
(Review updated until commit https://github.com/argoproj/argo-cd/commit/1e71863944dbdffe410a97ed544ec908d01c2781)
Here are some key observations to aid the review process:
| ⏱️ Estimated effort to review: 5 🔵🔵🔵🔵🔵 |
| 🧪 PR contains tests |
🔒 Security concerns
Potential Credential Exposure: The GetUserInfo method in util/git/creds.go retrieves sensitive information like usernames and emails. Ensure that this data is handled securely and not exposed in logs or error messages. |
⚡ Recommended focus areas for review
Generated Code The file commit.pb.go is a generated file. Ensure that the corresponding .proto file is properly defined and that the generated code aligns with the intended functionality.
Mock Behavior The Checkout mock behavior has been updated to return a string and an error. Ensure that this change is consistent with the actual implementation and does not introduce unintended side effects in the tests.
New Test Functions Several new test functions have been added, such as Test_nativeGitClient_SetAuthor, Test_nativeGitClient_CheckoutOrOrphan, and others. Ensure these tests cover all edge cases and align with the intended functionality.
Credential Management The GetUserInfo method has been added to multiple credential types. Ensure that this method is implemented correctly and handles all edge cases, especially for credentials like GitHubAppCreds and GoogleCloudCreds.
Credential Type Detection The getCredentialType function has been introduced. Ensure that it correctly identifies all supported credential types and handles edge cases, such as missing or incomplete repository information.
|
Persistent review updated to latest commit https://github.com/argoproj/argo-cd/commit/1e71863944dbdffe410a97ed544ec908d01c2781