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

Migrate to AWS SDK v2 #3

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Migrate to AWS SDK v2 #3

merged 1 commit into from
Jul 22, 2024

Conversation

splynn
Copy link

@splynn splynn commented Jul 22, 2024

No description provided.

@@ -243,7 +245,7 @@ func (p *Producer) flush(records []*kinesis.PutRecordsRequestEntry, reason strin

for {
p.Logger.Info("flushing records", LogValue{"reason", reason}, LogValue{"records", len(records)})
out, err := p.Client.PutRecords(&kinesis.PutRecordsInput{
out, err := p.Client.PutRecords(context.TODO(), &kinesis.PutRecordsInput{
Copy link
Member

Choose a reason for hiding this comment

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

Why not context.Background()? I assume you're not planning on changing this later?

Copy link
Author

@splynn splynn Jul 22, 2024

Choose a reason for hiding this comment

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

We should probably allow a context.Context to be passed into the Start method and propagate it here, but that would imply that we're handling a cancelled context in the dispatch loop. Implementing that handling seems beyond the scope of this migration, so this is just explicitly opting out of it for the time being.

@splynn splynn merged commit 0681f9f into master Jul 22, 2024
1 check passed
@splynn splynn deleted the migrate-to-aws-sdk-v2 branch July 22, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants