Merged
Conversation
… and improve logging
newgene
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new manager for cleaning up MongoDB build records and their associated collections, adds asynchronous MongoDB support, and exposes new commands and API endpoints for build management. The changes enhance the hub's ability to list, delete, and validate build records, keeping the database in sync with actual data and improving maintainability.
MongoDB Build Cleanup Features:
MongoBuildCleanupManagerandMongoBuildCleanerclasses inbiothings/hub/dataindex/mongo_build_cleanup.pyto support listing, deleting, and validating MongoDB build records and their target collections asynchronously.biothings/hub/__init__.py), registering it and exposing its methods as commands (list_mongo_builds,delete_mongo_builds,validate_mongo_builds). [1] [2] [3]API and Command Exposure:
mongo_builds,mongo_builds/delete,mongo_builds/validate) inbiothings/hub/__init__.py.Async MongoDB Support:
AsyncMongoClientand related async helper functions inbiothings/utils/mongo.pyto enable asynchronous database operations, used by the new cleanup manager. [1] [2] [3] [4]Dependency Update:
pyproject.tomlto requirepymongo>=4.13.0for stableAsyncMongoClientsupport. [1] [2]Logging Consistency:
biothings/hub/dataindex/snapshooter.pyfor consistency. [1] [2]