Closed scampbell5 closed 3 weeks ago
Thanks for opening your first issue here! We'll come back to you as soon as we can. In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
Hi @scampbell5! Thanks for pointing out this bug. Actually, you're 100% right, these fields should be int
instead of str
. Do you want to submit a PR to fix this? We can work together to merge it.
References: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html https://github.com/aws/aws-lambda-go/blob/main/events/kafka.go
@leandrodamascena Appreciate the quick response! I'll work on putting together a PR later tonight to fix this.
Perfect, let me know if you have any questions or blocks, and we can work together on this!
We truly appreciate when the community contributes to the project. 🚀
@leandrodamascena I've submitted this PR if you don't mind taking a look when you have time: https://github.com/aws-powertools/powertools-lambda-python/pull/4515
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Expected Behaviour
The properties for
offset
andpartition
are the correctint
type on theKafkaEventRecord
class.Current Behaviour
The properties for
offset
andpartition
on theKafkaEventRecord
are currently defined asstr
type.Code snippet
https://github.com/aws-powertools/powertools-lambda-python/blob/develop/aws_lambda_powertools/utilities/data_classes/kafka_event.py#L18
Possible Solution
Change the type to
int
for thepartition
andoffset
properties on theKafkaEventRecord
class.Steps to Reproduce
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.11
Packaging format used
Lambda Layers
Debugging logs
No response