Skip to content

Build cleanup#437

Merged
DylanWelzel merged 5 commits into1.1.xfrom
build-cleanup
Mar 2, 2026
Merged

Build cleanup#437
DylanWelzel merged 5 commits into1.1.xfrom
build-cleanup

Conversation

@DylanWelzel
Copy link
Copy Markdown
Contributor

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:

  • Added MongoBuildCleanupManager and MongoBuildCleaner classes in biothings/hub/dataindex/mongo_build_cleanup.py to support listing, deleting, and validating MongoDB build records and their target collections asynchronously.
  • Integrated the new manager into the hub initialization (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:

  • Added new API endpoints for MongoDB build management (mongo_builds, mongo_builds/delete, mongo_builds/validate) in biothings/hub/__init__.py.

Async MongoDB Support:

  • Introduced AsyncMongoClient and related async helper functions in biothings/utils/mongo.py to enable asynchronous database operations, used by the new cleanup manager. [1] [2] [3] [4]

Dependency Update:

  • Updated pyproject.toml to require pymongo>=4.13.0 for stable AsyncMongoClient support. [1] [2]

Logging Consistency:

  • Minor adjustments to logging imports in biothings/hub/dataindex/snapshooter.py for consistency. [1] [2]

@DylanWelzel DylanWelzel merged commit c74e044 into 1.1.x Mar 2, 2026
12 of 13 checks passed
@DylanWelzel DylanWelzel deleted the build-cleanup branch March 2, 2026 18:21
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