fix: address kafka plugin review feedback - #19
Conversation
|
This PR supersedes #18 and addresses all the review feedback left there. Summary of changes made in response to the review:
Validation run locally: End-to-end runbook tested against Redpanda locally — screenshots attached. @JordanAlec please review and approve |
JordanAlec
left a comment
There was a problem hiding this comment.
Thanks again for addressing the previous comments. I think we are almost there and ready to merge in. However I think your fork maybe outdated as there has been accidental removals of mongodb plugin parts.
Once addressed I'd be happy to do some final checks and get this merged in.
Appreciate your support and contribution.
|
@JordanAlec I Have made the required changes. Please review and approve |
|
@JordanAlec can you please test it and merge |
There was a problem hiding this comment.
Thanks for restoring the mongodb parts, confirmed those are all back (suite.ts, types/suite.ts, .env.template, package.json, tools/README.md).
One remaining accidental removal: pg has been dropped from example/package.json (and is gone from package-lock.json entirely). The SQL plugin's knex client supports client: 'pg' and needs that driver installed at runtime. This will break Postgres usage of the sql plugin even though unit tests still pass (they mock knex directly, so the missing driver isn't exercised).
Please restore pg in example/package.json dependencies. Happy to do final checks once that's back in.
There was a problem hiding this comment.
Correction to my last comment. Mongodb is NOT fully restored. dtk/cli/add.ts still has the mongodb entry replaced by kafka:
- 'mongodb': 'mongodb',
+ 'kafka': 'kafka',The dtk/templates/plugins/mongodb/ template files are still present and mongodb is still wired into the example project, but PLUGIN_MAP in cli/add.ts no longer has a mongodb key. Running dtk add mongodb now fails with Unknown plugin: "mongodb" and exits 1. The CLI command is broken, not just docs/lockfile. Please add 'kafka': 'kafka' alongside the existing 'mongodb': 'mongodb' entry rather than replacing it.
pg in example/package.json still needs restoring too, per my previous comment.




Summary
Adds Kafka plugin support using KafkaJS.
Changes
produce,consume, anddisconnectmethodsReview Feedback Addressed
example.tsto usesuite().step().run("stopOnError")load-envimportconsume()calls from re-subscribing an already running consumerconsume()callsValidation
npm test npm run build