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

fix: monorepo selfheal should not happens if manifest is the same #322

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

pasha-codefresh
Copy link
Member

No description provided.

@pasha-codefresh
Copy link
Member Author

@CodiumAI-Agent /review

@CodiumAI-Agent
Copy link

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

Logic Change
The new logic introduced in alreadyAttemptedSync function checks if the manifest has changed by accessing manifestsChangedMap[commitSHA]. Ensure that this logic correctly handles cases where manifestsChangedMap might not have the commitSHA key, to avoid potential panics due to nil map access.

Error Handling
The function GetRepoObjs has multiple return points where it returns errors. It's crucial to ensure that these errors are handled appropriately in all calling functions to avoid ignoring errors which might lead to inconsistent states or failures in processing.

Performance Concern
The function GetRepoObjs seems to be doing significant processing including database operations, settings retrieval, and possibly network calls. Consider optimizing this function by caching frequently accessed data, or by reducing the complexity and number of operations performed.

return false, ""
manifestsChangedMap := app.Status.Sync.ManifestsChanged
if manifestsChangedMap[commitSHA] {
if app.Status.OperationState.SyncResult.Revision != commitSHA {

Choose a reason for hiding this comment

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

make fix for multi-sourced also

Copy link
Member Author

Choose a reason for hiding this comment

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

i will do it when will open pr to oss, for now it is optional

@pasha-codefresh pasha-codefresh merged commit c787eab into release-2.11 Jul 30, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants