Releases: mostafa/xk6-kafka
v0.17.0
This release contains the following changes:
- AWS IAM SASL mechanism is added for authenticating against AWS MSK, thanks to @gokceyalcin for the initial PR.
- k6 is updated to v0.43.0 and the rest of the dependencies are also updated to their latest versions.
- Time constants are exported to JS.
- Add a few more FAQ to README for autocompletion in IDEs and usage of time constants.
What's Changed
Full Changelog: v0.16.1...v0.17.0
v0.16.1
This release contains some changes and fixes:
- The
ReaderConfig
is updated with new parameters. - The
Reader
now validates all the consumer-group-specific parameters. - A new script,
test_consumer_group.js
is added for reading from a consumer group using agroupID
and other parameters. - JS API docs are updated accordingly.
- The description of emitted metrics and their type are added to the README.
- k6 is bumped to v0.42.0 and other dependencies are updated.
What's Changed
- Add
readBatchTimeout
toReaderConfig
by @mostafa in #188 - Fix
ReaderConfig
's default values and a few other fixes by @mostafa in #189
Full Changelog: v0.16.0...v0.16.1
v0.16.0
v0.15.1
This release fixes a bug reported by @SameeranB in #174 that caused k6 internal gRPC module to fail when the Kafka extension is imported.
What's Changed
Full Changelog: v0.15.0...v0.15.1
v0.15.0
k6 v0.41.0 was released yesterday! 🎉
Since I am working for the same company, I usually update the extension as soon as I get the information about the release and changes, and this one is no exception. In this release I upgraded k6 to version 0.41.0 as a dependency. There were breaking changes to the metrics API, which I fixed. I also updated all the other dependencies and fixed two minor issues that was failing the tests.
What's Changed
- Integrate with k6 v0.41.0 by @mostafa in #173
- Fix issues by @mostafa in f3c80c6
- Update dependencies to latest versions by @mostafa in 60c4e1e
Full Changelog: v0.14.2...v0.15.0
v0.14.2
In this release an issue is fixed that was reported in #150 and #166. The issue was that mutual TLS (mTLS), aka. two-way TLS, was enforced when configuring TLS via the TLSConfig
object, but sometimes the users needed to have normal one-way TLS, for example in Schema Registry config. Now the TLSConfig
object can be used in three different ways:
- Enabling TLS to just use system certificates:
const tlsConfig = {
enableTls: true,
insecureSkipTlsVerify: false,
minVersion: TLS_1_2,
};
- Enabling one-way TLS using a custom server certificate:
const tlsConfig = {
enableTls: true,
insecureSkipTlsVerify: false,
minVersion: TLS_1_2,
serverCaPem: "/path/to/your/server-ca.pem",
};
- Enabling two-way mTLS using a custom server certificate and client certificate and key files:
const tlsConfig = {
enableTls: true,
insecureSkipTlsVerify: false,
minVersion: TLS_1_2,
serverCaPem: "/path/to/your/server-ca.pem",
clientCertPem: "/path/to/your/client-cert.pem",
clientKeyPem: "/path/to/your/client-key.pem",
};
What's Changed
- Fix bug in TLS config handling by @mostafa in #170
- Update README and API docs by @mostafa in 09675bc f62f7ab 293f1f0
- Update dependencies to latest version by @mostafa in e066e68
Full Changelog: v0.14.1...v0.14.2
v0.14.1
v0.14.0
In this release, I put a lot of effort into exporting the Schema Registry class to the JS API and changed the (de)serialization to make it explicit so that the users can (de)serialize their data manually. The following is what went into this release:
-
The significant refactorings of the extensions (#44) are finished.
-
Much like the last few releases, this one contains breaking changes to the JS API and how it (de)serializes data (#50, #53, #54, and #55). The usage of
schemaRegistry.serialize
andschemaRegistry.deserialize
can be seen in the example scripts.import { SchemaRegistry } from "k6/x/kafka"; const schemaRegistry = SchemaRegistry({ url: "...", basicAuth: {...}, tls: {...} }); schemaRegistry.getSchema({ version: 0, subject: "..." }); // 0 means latest schema schemaRegistry.createSchema({ version: 0, subject: "...", schema: "...", schemaType: "AVRO" }); schemaRegistry.getSubjectName({ element: "...", topic: "...", schema: "...", subjectNameStrategy: "..." }); // You can pass a string, byte array, and JSON objects as data. Regardless of the data, the schemaType must also be passed. // For schemaless data, like string, only the data and the schemaType (SCHEMA_TYPE_STRING) should be passed. schemaRegistry.serialize({ schema: "...", data: "...", schemaType: SCHEMA_TYPE_AVRO }); schemaRegistry.deserialize({ schema: "...", data: "...", schemaType: SCHEMA_TYPE_AVRO });
-
The JS API docs now reside in the
api-docs
directory. -
The data can now be passed to
consume
orproduce
as a string, byte array, or JSON (#116) format (without stringification). However, theschemaType
should be set. And in the case of JSONSchema and Avro, theschema
should also be set. -
The test and the build CI pipelines are also fixed.
-
All the test scripts run on the test CI pipeline now, except the
scripts/test_sasl_auth.js
(#48 and f2bd747). -
The SBOMs are generated for both the source code and the Docker image (#78) and will be stored on the release page (#152).
-
The Docker image is now signed by the
cosign
, and the signature is verified and stored on Docker Hub (#155, 052f73f, 4fb3c33, e94e20b, 9949398, ec861bc, and f66ef7b). -
The purpose of this extension is not to load-test the Schema Registry. Thus, the schema is cached now by the extension, effectively bypassing the schema caching in the
srclient
library (that can also be enabled, though), as raised by @oscar067 in #146 and his initial fix in #147 (#151).
What's Changed
- Export Schema Registry client and the serdes functionality by @mostafa in #149
- Store SBOMs in a better place by @mostafa in #153
- Generate SBOM from the latest uploaded Docker image and store it on the release page by @mostafa in #154
- Sign the Docker image with
cosign
by @mostafa in #157 - Fix no exception being raised on writer errors by @mostafa in #158
- Enable selective schema caching by @mostafa in #151 (originally by @oscar067 in #146 and #147)
- Lots of changes to docs, README, and the CI pipelines by @mostafa in f2bd747, 20859bc, ad75602, a7e5b37, e3615e0, c881647, 052f73f, 4fb3c33, e94e20b, 9949398, ec861bc, and f66ef7b.
Full Changelog: v0.13.1...v0.14.0
v0.13.1
I released this patched version to fix two bugs reported by the awesome users of this extension:
- #143 reported by @ferras777 and fixed by @mostafa in 423aacb
- #144 reported by @alex-rozlyvanov and fixed by @mostafa in 91cf77c
Full Changelog: v0.13.0...v0.13.1
v0.13.0
This release is a bugfix release and includes mostly cosmetic changes to the Go codebase that were reported by various linters via golangci-lint
. I fixed the CI to use the golangci-lint-action
and created a configuration file to enable all linters, including gosec
, except a few. All constructors and functions are now unexported and you can access them via either of these classes: Writer
, Reader
or Connection
.
I addressed these issues:
- Fix all (feasible) linter errors
- Fix configuration objects in the example scripts
- Constructors and non-constructors needn't be exported
- Refactor and remove deprecated kafka-go functions
Also, @thmshmm was kind enough to fix a bug in #129 that I introduced in the byte array serializer. 🙏
What's Changed
- Update referenced branch in the JS API docs by @mostafa in #105
- Instantiate the
kafkago.Writer
object directly by @mostafa in #107 - Remove duplicate test and merge the assertion by @mostafa in #110
- Reduce function length, hence complexity by @mostafa in #111
- Extract constants by @mostafa in #113
- Fix
gocritic
suggestions by @mostafa in #114 - Fix
godot
errors by @mostafa in #115 - Fix reported issues by gofumpt and goimports by @mostafa in #117
- Fix
golint
errors by @mostafa in #118 - Fix long lines reported by
lll
by @mostafa in #120 - Fix
maligned
errors by @mostafa in #121 - Fix Schema Registry configuration object in the scripts by @mostafa in #123
- Fix
if
statement complexity errors by uwrapping theif
statements by @mostafa in #127 - Generic
Message.value
field type to handle values other than string by @thmshmm in #129 - Force type assertions by @mostafa in #131
- Use static error messages to fix
goerr133
linter errors by @mostafa in #132 - Fix numeric constants throughout the code by @mostafa in #133
- Fix JSON tags by @mostafa in #134
- Fix issues reported by
thelper
by @mostafa in #135 - Fix the length of the variable names by @mostafa in #136
- Unwrap errors from external packages by @mostafa in #137
- Fix remaining linter issues by @mostafa in #138
- Enable all linters and remove
gosec
by @mostafa in #139 - Unexport constructors with
X
prefix and also module-level exported functions by @mostafa in #140 - Upgrade k6 to v0.39.0 and other dependencies to their latest versions by @mostafa in dc5b114
- A few other changes and fixes by @mostafa in 9551edb c6bdb87
Full Changelog: v0.12.0...v0.13.0