Skip to content

fix(aws): avoid cancelling the active Bedrock recycle task#6281

Open
nightcityblade wants to merge 2 commits into
livekit:mainfrom
nightcityblade:fix/issue-5879
Open

fix(aws): avoid cancelling the active Bedrock recycle task#6281
nightcityblade wants to merge 2 commits into
livekit:mainfrom
nightcityblade:fix/issue-5879

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Fixes #5879

Summary

  • avoid cancelling the currently running recycle timer while it is bringing up the replacement Bedrock session
  • keep cancelling any older recycle timer task before arming a new one
  • add regression tests covering both self-rearm and previous-timer replacement

Testing

  • uv run --extra realtime pytest -q tests/test_aws_realtime_session_recycle.py
  • ruff check livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realtime/realtime_model.py tests/test_aws_realtime_session_recycle.py

@nightcityblade nightcityblade requested a review from a team as a code owner July 1, 2026 03:28
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nightcityblade seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@nightcityblade

Copy link
Copy Markdown
Contributor Author

Pushed 44d2a82 to address the CI failure. The new tests/test_aws_realtime_session_recycle.py module now declares pytestmark = pytest.mark.unit, which matches the repo's required test categorization and should unblock the unit-tests job.

Validation: uv run ruff check tests/test_aws_realtime_session_recycle.py

I wasn't able to run that test module end-to-end locally on macOS because collection hits a missing aws_sdk_bedrock_runtime import in this environment, but the failing CI signal was the missing category marker and that is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent goes dead after AWS Bedrock session recycle (LK_SESSION_MAX_DURATION)

2 participants