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