Skip to content

Revert "[bugfix] Add close method for static discovery"#816

Open
max-wittig wants to merge 2 commits intovllm-project:mainfrom
max-wittig:revert-692-bugfix/static-discovery-close
Open

Revert "[bugfix] Add close method for static discovery"#816
max-wittig wants to merge 2 commits intovllm-project:mainfrom
max-wittig:revert-692-bugfix/static-discovery-close

Conversation

@max-wittig
Copy link
Contributor

Reverts #692

Closes #815

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @max-wittig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request reverts a previous change that introduced a close method and associated state management for static service discovery. The revert removes the mechanism for gracefully shutting down health check tasks, restoring the previous behavior where the health check loop runs indefinitely without explicit termination logic. This addresses issues potentially introduced by the original "bugfix" related to the close method.

Highlights

  • Removal of _running flag: The _running instance variable, previously used to control the health check loop, has been removed from the ServiceDiscovery class.
  • Modification of health check loop: The check_model_health method's loop now runs indefinitely (while True) and uses time.sleep(60) instead of asyncio.sleep(60), removing asynchronous cancellation handling.
  • Removal of close method: The close method, which was responsible for gracefully shutting down the service discovery module's health check resources, has been entirely removed.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reverts a previous change that added a close method for static service discovery. While this might be necessary to fix an issue with the graceful shutdown, the revert re-introduces a critical bug in the health check logic by using a blocking time.sleep call within an async function. My review provides a fix for this issue.

except asyncio.CancelledError:
logger.debug("Health check task cancelled")
break
time.sleep(60)
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

check_model_health is an async function. Using the blocking time.sleep(60) will block the event loop running in the health check thread. You should use the non-blocking await asyncio.sleep(60) instead.

Additionally, get_unhealthy_endpoint_hashes() is also a blocking call because it uses requests and should ideally be run in an executor to avoid blocking the event loop. For example: await self.loop.run_in_executor(None, self.get_unhealthy_endpoint_hashes).

Suggested change
time.sleep(60)
await asyncio.sleep(60)

This reverts commit 5aa144d.

Signed-off-by: Max Wittig <max.wittig@siemens.com>
@max-wittig max-wittig force-pushed the revert-692-bugfix/static-discovery-close branch from e3fc993 to 9a8347e Compare February 2, 2026 10:12
Signed-off-by: Max Wittig <max.wittig@siemens.com>
@max-wittig max-wittig force-pushed the revert-692-bugfix/static-discovery-close branch from fa5a81a to ce9eeb3 Compare February 2, 2026 16:03
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.

bug: Health check no longer working

1 participant