-
Notifications
You must be signed in to change notification settings - Fork 13
Metadata v8 #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Metadata v8 #102
Conversation
There seems to be a CI problem? |
Yeah its a weird one, i'll have a look i tested locally against 3.7 |
I can see some issues with base tests when force v8. |
Actually it seems it was just a flake. @ShogunPanda can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrykwegrzyn Thanks for your contribution!
The code looks good to me, but I just have a little issue: so far I tried not to leave any "hole" in the supported API versions. Could you please implement Metadata v9, v10, v11 as well? I guess it will be mostly copying files over and make little modifications.
Thanks!
topics: reader.readArray( | ||
(r, i) => { | ||
const ec = r.readInt16() | ||
if (ec !== 0) errors.push([`/topics/${i}`, ec]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you please add {
and }
here?
Any thoughts on this? this test will break on lower versions , can we move it to version specific test with something like |
We already negotiate the version from the broker, see https://github.com/platformatic/kafka/blob/main/src/clients/base/base.ts#L362 and https://github.com/platformatic/kafka/blob/main/src/clients/base/base.ts#L552 |
Cheers for this!! Will you be ok with const getApi = promisify(client[kGetApi].bind(client))
const api = await getApi('Metadata')
const testTopic = `test-topic-${randomUUID()}`
// Fetch metadata with autocreate
const metadata = await client.metadata({
topics: [testTopic],
autocreateTopics: true
})
const topicMetadata = metadata.topics.get(testTopic)!
if (api.version >= 10) {
strictEqual(typeof topicMetadata.id, 'string')
} and make |
Yup, go ahead! |
sweet ill submit Metadata v9, v10, v11 after holiday |
Redpanda compatibility