fix(cmd): negative or zero parallelism#2114
Open
manishsvk wants to merge 7 commits into
Open
Conversation
The --parallelism flag was passed without validation. A value < 1 would hang or panic: Solve blocks forever on a nil event channel, and the validator either hangs or panics on a negative channel buffer. Added a checkParallelism helper and called it early with a clear usage error.
Adding unit tests for the parallelism fix
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2114 +/- ##
==========================================
+ Coverage 33.17% 34.12% +0.94%
==========================================
Files 78 78
Lines 7433 7443 +10
==========================================
+ Hits 2466 2540 +74
+ Misses 4763 4669 -94
- Partials 204 234 +30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
LGTM - will approve once CI is fixed |
harshadixit12
previously approved these changes
Jun 17, 2026
Contributor
|
This should have a go.mod update with a new GDR version that has the changes added here: |
Contributor
We skipped it because it was not strictly required - it can go with next gdr release IMO |
let's do the GDR version bump as well
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.
Summary
This change adds a
checkParallelismhelper so an invalid value is rejected up front with a usage error, before any state file is read or any request is sent to Kong. Valid values (>= 1) are unaffected.Full changelog
checkParallelismhelper incmd/common.go]--parallelism < 1(covers gatewaysync,diff,applyandvalidatecommands)]go-database-reconcilerversion]checkParallelism(zero, negative, positive)]Issues resolved
Fix #375
Testing