fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation()#27749
fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation()#27749peikk0 wants to merge 1 commit intoargoproj:masterfrom
Conversation
…kMutation() Signed-off-by: Pierre Guinoiseau <pierre@guinoiseau.nz>
✅ Preview Environment deployed on Bunnyshell
See: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #27749 +/- ##
==========================================
+ Coverage 63.87% 63.88% +0.01%
==========================================
Files 421 421
Lines 57657 57657
==========================================
+ Hits 36828 36836 +8
+ Misses 17370 17360 -10
- Partials 3459 3461 +2 ☔ View full report in Codecov by Sentry. |
ppapapetrou76
left a comment
There was a problem hiding this comment.
Thanks for catching and fixing this
Do you think a test that fails before the change and passes now worth the effort?
|
@ppapapetrou76 I'm not sure it's worth the effort for this specific fix which was just a misplaced error check, the real error is somewhere in |
If
typedLive.Merge(typedPredictedLive)fails for any reasontypedPredictedLivebecomesnil, resulting in aninvalid memory address or nil pointer dereferenceerror on the next line becauseerrwas not checked first:Checklist: