Skip to content

ci: tav tests failing for kafkajs v1.7.0 #2784

@JamieDanielson

Description

@JamieDanielson

TAV tests are failing for kafka instrumentation on an older version of kafkajs.

In older tests, there were warnings about a change in KafkaJS v2.0.0 for default partitioners. To see this, search the raw log for required packages ["kafkajs@2..

{"level":"WARN","timestamp":"2025-03-19T09:42:57.788Z","logger":"kafkajs","message":"KafkaJS v2.0.0 switched default partitioner. To retain the same partitioning behavior as in previous versions, create the producer with the option "createPartitioner: Partitioners.LegacyPartitioner". See the migration guide at https://kafka.js.org/docs/migration-guide-v2.0.0#producer-new-default-partitioner for details. Silence this warning by setting the environment variable "KAFKAJS_NO_PARTITIONER_WARNING=1""}

In #2752 we updated the test to remove the warning, with createPartitioner: kafkajs.Partitioners.LegacyPartitioner. It seems that PR didn't run TAV tests so we didn't see the failing test.

Now we have a failing test with "[email protected]": TypeError: Cannot read properties of undefined (reading 'LegacyPartitioner')

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpkg:instrumentation-kafkajspriority:p4Bugs and spec inconsistencies which do not fall into a higher prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions