Repository navigation
Conversation
Signed-off-by: YamonBot <141118378+YamonBot@users.noreply.github.com>
|
Bito Review Skipped - Source Branch Not Found |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to skip Argo CD status updates for unmanaged applications.
No open issues 🎉
What changed in this PR
Fixes #7095 by skipping Argo CD status updates for unmanaged applications without logging expected pg.ErrNoRows lookup misses as errors.
Changes:
- Uses
errors.Isin the read service and event handler to recognize direct and wrapped lookup misses. - Preserves original lookup errors, error logging for other failures, and managed-chart status processing.
- Extracts the event handler and adds regression tests for unmatched applications, database failures, and registered charts.
| File | Description |
|---|---|
| pkg/eventProcessor/in/DeployedApplicationEventProcessorService.go | Extracts the handler and silently skips unmatched applications. |
| pkg/eventProcessor/in/DeployedApplicationEventProcessorService_test.go | Tests lookup misses, failure logging, and registered-chart processing. |
| pkg/appStore/installedApp/read/InstalledAppReadService.go | Suppresses expected lookup-miss logs while preserving returned errors. |
Review effort: Balanced
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Fixes #7095.
Argo CD status events can arrive for applications that have neither a pipeline nor an installed chart in Devtron. When the installed-chart lookup returns
pg.ErrNoRows, the lookup and the event handler currently both log an error for the expected miss.Use
errors.Isat both boundaries. The read service continues returning the original error to its callers, and the status handler skips the update when that error matchespg.ErrNoRows. Other lookup failures retain their error logs, and installed charts continue through status processing.How Has This Been Tested?
GOTOOLCHAIN=go1.26.10 go test -mod=vendor ./pkg/eventProcessor/in ./pkg/appStore/installedApp/read -count=1The regression exercises the status handler with the real installed-app read service and stub repositories. It checks direct and wrapped
pg.ErrNoRows, a database connection failure, and the registered-chart path. On a case-sensitive checkout, mirror the lowercase Microsoft vendor path as the repository Dockerfile does before running the command.Checklist
Does this PR introduce a user-facing change?