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

CloudWatch Logs's GetLogEvents paginator never terminates #1326

Closed
ianbotsf opened this issue Jun 7, 2024 · 1 comment · Fixed by #1383
Closed

CloudWatch Logs's GetLogEvents paginator never terminates #1326

ianbotsf opened this issue Jun 7, 2024 · 1 comment · Fixed by #1383
Assignees
Labels
bug This issue is a bug.

Comments

@ianbotsf
Copy link
Contributor

ianbotsf commented Jun 7, 2024

Describe the bug

The CloudWatch Logs client supports a paginator over GetLogEvents but using this paginator yields a never-ending Flow. The service API documentation describes how the pagination token returned will be the same as the input token when there are no more records to retrieve. Our pagination logic won't handle this case and will basically continue issuing subsequent API calls which yield empty responses for logs which are no longer actively appending.

Expected behavior

Other SDKs (e.g., Java v2, JS v3) have added customizations which handle GetLogEvents's non-standard pagination. We should investigate doing the same.

Current behavior

See above.

Steps to Reproduce

cloudWatchLogsClient
    .getLogEventsPaginated {
        logGroupName = "..."
        logStreamName = "..."
    }
    .collect { println("Page of log events: ${it.events?.size} records, nextToken = ${it.nextForwardToken}") }

Possible Solution

No response

Context

No response

AWS SDK for Kotlin version

1.2.28

Platform (JVM/JS/Native)

JVM

Operating system and version

any

@ianbotsf ianbotsf added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 7, 2024
@ianbotsf ianbotsf self-assigned this Aug 12, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant