Skip to content
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

Upgrade kafkajs package #139867

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Upgrade kafkajs package #139867

merged 3 commits into from
Dec 18, 2024

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented Dec 17, 2024

Description

  • Upgrade kafkajs package to major version 2
  • Rename unmarshall function for clarity
    • although we could just use this function directly, I think the wrapper at least allows future updates to be easier. I believe when we went from v2 to v3 in aws-sdk we had to remove a configuration parameter on the unmarshaller

Resources:
Release log
Official migration guide

Related ticket(s)

CMDCT-4174


How to test

  • Perform actions that update the DB
  • Check the kafka lambda logs to ensure they update (carts-bigmac-streams-cmdct-4174-postKafkaData)

Notes

I matched functionality from v1. For example: timeouts are now default, but I disabled them in our config to match what we did before enforceRequestTimeout: false

The new functionality allows headers to be arrays, and expects us to check for them. Nowhere in our code do we use .headers so I think we are ok. I verified our lambda logs can process arrays of messages as well.


Pre-review checklist

  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • I have manually tested this PR in the deployed cloud environment

src/run.ts Outdated Show resolved Hide resolved
@gmrabian gmrabian marked this pull request as ready for review December 17, 2024 18:29
@gmrabian gmrabian added the ready for review Ready for all the reviews! label Dec 17, 2024
Copy link
Contributor

@bangbay-bluetiger bangbay-bluetiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified log changes.

ntsummers1
ntsummers1 previously approved these changes Dec 17, 2024
Copy link

codeclimate bot commented Dec 18, 2024

Code Climate has analyzed commit 0fde9b8 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 81.3% (0.0% change).

View more on Code Climate.

@gmrabian gmrabian merged commit 935c46e into main Dec 18, 2024
19 checks passed
@gmrabian gmrabian deleted the cmdct-4174 branch December 18, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants