fix(webhook): match Helm OCI apps using repoURL+chart against registry events#27954
Open
adityaraj178 wants to merge 2 commits into
Open
fix(webhook): match Helm OCI apps using repoURL+chart against registry events#27954adityaraj178 wants to merge 2 commits into
adityaraj178 wants to merge 2 commits into
Conversation
…y events Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
✅ Preview Environment deployed on Bunnyshell
See: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
14 tasks
Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #27954 +/- ##
==========================================
+ Coverage 63.84% 64.39% +0.54%
==========================================
Files 418 422 +4
Lines 57269 57835 +566
==========================================
+ Hits 36565 37241 +676
+ Misses 17290 17092 -198
- Partials 3414 3502 +88 ☔ View full report in Codecov by Sentry. |
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.
Reference: #27884 (comment)
When an OCI registry webhook fires, ArgoCD must determine which apps to refresh. For plain OCI apps the app's repoURL equals the full image path, so a direct normalizeOCI comparison works fine.
Helm OCI apps are configured differently: ArgoCD stores them with
OCI registry webhooks (Harbor etc.) report the full artifact path: repository = / (e.g.myorg/charts/mychart)
HandleRegistryEvent reconstructs the full URL as oci:/// (e.g. oci://registry.example.com/myorg/charts/mychart)
The previous single-URL comparison only checked repoURL, so Helm OCI apps never matched and were never refreshed after a push.
Changes in this PR:
when
source.Chartis set, also trynormalizeOCI(source.RepoURL +"/" + source.Chart)as the effective full URL before skipping the app. This lets both plain OCI apps (no chart field) and Helm OCI apps (chart field set) resolve correctly from the same webhook event.Checklist: