[TT-15560] added batchbytes configs and unit testing for kafka #889
+241
−2
probelabs / Visor: style
succeeded
Oct 13, 2025 in 5m 1s
✅ Check Passed (Warnings Found)
style check passed. Found 1 warning, but fail_if condition was not met.
Details
📊 Summary
- Total Issues: 1
- Warning Issues: 1
🐛 Issues by Category
🎨 Style (1)
⚠️ pumps/kafka.go:186 - The application handles an invalid negativebatch_bytesconfiguration by logging an error and then proceeding with a default value (0). This approach can mask configuration issues, as the error may be missed in logs, leading the service to run with unintended performance characteristics. A better practice for invalid configuration is to fail fast.
Generated by Visor - AI-powered code review
Annotations
Check warning on line 189 in pumps/kafka.go
probelabs / Visor: style
style Issue
The application handles an invalid negative `batch_bytes` configuration by logging an error and then proceeding with a default value (0). This approach can mask configuration issues, as the error may be missed in logs, leading the service to run with unintended performance characteristics. A better practice for invalid configuration is to fail fast.
Raw output
Instead of logging and continuing, return an error from the `Init` function when `k.kafkaConf.BatchBytes` is negative. This ensures that the application will not start in a misconfigured state, making the problem immediately apparent to the operator.
Loading