Skip to content

fix: json summary output and dropped events addition#1841

Merged
Prashansa-K merged 3 commits intomainfrom
fix/json-output
Feb 17, 2026
Merged

fix: json summary output and dropped events addition#1841
Prashansa-K merged 3 commits intomainfrom
fix/json-output

Conversation

@Prashansa-K
Copy link
Contributor

@Prashansa-K Prashansa-K commented Jan 7, 2026

Due to the way we were handling json output earlier, it showed false summary output if an
upstream error occurred. The user didn't see what operations were performed on the gateway
as the summary showed 0 for all ops.
This is fixed in this PR. Now, json output is similar to yaml output in terms of summary printing.

Further, we have added the new fields added in GDR for dropped operations.
Kong/go-database-reconciler#362

Added a unit test for json output. At the moment, we can't simulate error in
performDiff that can fill Dropped operations.
One way was to set a negative parallelism to trigger this error.
However, there's a bug in go-database-reconciler where Run() returns early on
parallelism < 1 without closing channels, causing Solve() to hang when
it tries to range over sc.eventChan.
Captured the bug here: Kong/go-database-reconciler#375
Not prioritising this or the error test yet as this is not a burning issue.

For #1854

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 43.75000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.11%. Comparing base (7a17e18) to head (f7a5030).

Files with missing lines Patch % Lines
cmd/common.go 43.75% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1841      +/-   ##
==========================================
+ Coverage   32.74%   33.11%   +0.36%     
==========================================
  Files          73       73              
  Lines        6566     6572       +6     
==========================================
+ Hits         2150     2176      +26     
+ Misses       4252     4228      -24     
- Partials      164      168       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Prashansa-K Prashansa-K merged commit 04f90cb into main Feb 17, 2026
39 checks passed
@Prashansa-K Prashansa-K deleted the fix/json-output branch February 17, 2026 10:38
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