Skip to content

Merge branch 'master' into TT-15560-Add-batchbytes-config-for-Kafka-pump

02c34db
Select commit
Loading
Failed to load commit list.
Merged

[TT-15560] added batchbytes configs and unit testing for kafka #889

Merge branch 'master' into TT-15560-Add-batchbytes-config-for-Kafka-pump
02c34db
Select commit
Loading
Failed to load commit list.
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 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.

Generated by Visor - AI-powered code review

Annotations

Check warning on line 189 in pumps/kafka.go

See this annotation in the file changed.

@probelabs 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.