Skip to content

Conversation

@molon
Copy link
Contributor

@molon molon commented Jan 2, 2026

When Serve() fails while Start() is waiting for readiness probes, Start() should return immediately instead of hanging.

Provide context or links (Jira ticket, Slack thread) for both the reviewer and your future self:

  • Jira ticket:
  • Slack thread:

When Serve() fails while Start() is waiting for readiness probes, Start() should return immediately instead of hanging.
Copilot AI review requested due to automatic review settings January 2, 2026 19:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a concurrency issue where Start() could hang indefinitely when waiting for readiness probes if the background Serve() goroutine fails. The fix adds a check for the lifecycle's Done() channel in the probe waiting loop, allowing Start() to return immediately with the failure error instead of blocking.

Key changes:

  • Added lc.Done() case to the select statement in the readiness probe waiting loop
  • Added comprehensive test coverage for the hanging scenario with multiple actor types

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lifecycle/lifecycle.go Added Done() check in the readiness probe loop to detect Serve() failures and return immediately
lifecycle/lifecycle_test.go Added test case validating that Start() doesn't hang when Serve() fails during probe wait

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@molon molon merged commit b3f77d0 into main Jan 2, 2026
2 checks passed
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.

2 participants