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: send change events always #119

Merged
merged 1 commit into from
Aug 2, 2024
Merged

fix: send change events always #119

merged 1 commit into from
Aug 2, 2024

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Aug 2, 2024

Summary

Fixes a bug in the event sender. The original structure of this section meant that GDR only sent change events to the channel if they had encountered in an error. This did not make the KIC DB mode error event generator unhappy, but did not work very well for Kong/kubernetes-ingress-controller#6131, as it did not see most change events. Whoops.

This assigns the error to the event regardless of whether it's nil or not (it'll either populate or just remain nil) and sends the event off before checking for a non-nil error and performing the error return.

After this change, the channel will receive successful events also. This was the original intent, but the breakage went unnoticed til I tried to actual look at successful events.

@rainest rainest enabled auto-merge (squash) August 2, 2024 00:52
@rainest rainest requested a review from a team August 2, 2024 00:52
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 41.35%. Comparing base (61fbc91) to head (96cece3).

Files Patch % Lines
pkg/diff/diff.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
- Coverage   41.35%   41.35%   -0.01%     
==========================================
  Files          75       75              
  Lines       10895    10896       +1     
==========================================
  Hits         4506     4506              
- Misses       5925     5926       +1     
  Partials      464      464              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rainest rainest merged commit 299110b into main Aug 2, 2024
42 checks passed
@rainest rainest deleted the fix-event-channel branch August 2, 2024 03:31
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