Skip to content

Conversation

@fer-marino
Copy link

@fer-marino fer-marino commented Dec 18, 2025

Description

This pull request implements a significant modernization of the codebase, primarily focusing on the migration to Pydantic v2 and upgrading the Weaviate client to v4.18.x. It also includes backward compatibility patches for existing benchmark results and addresses UI deprecation warnings.

Key Changes

1. Pydantic v2 Migration

  • Updated configuration models to comply with Pydantic v2's stricter validation rules.
  • Added default values to required fields in several database configuration classes (MariaDB, PgVector) to ensure smooth validation when loading partial or legacy data.
  • Updated validation logic to use Pydantic v2 features like field_validator and improved ValidationError handling from pydantic_core.
  • Standardized the use of SecretStr for sensitive connection details (passwords, API keys) across all database clients.

2. Weaviate Client Upgrade (v3.x → v4.18.x)

  • Refactored the WeaviateCloud client to use the new Weaviate v4 "Collections" API.
  • Migrated connection logic to weaviate.connect_to_custom, utilizing both HTTP and gRPC endpoints for improved performance.
  • Updated schema management and search queries to use the new weaviate.classes.config and fluent interface.
  • Added a normalization layer in WeaviateCloud._ensure_cfg to support both legacy dict configurations and new WeaviateConfig models.

3. Backward Compatibility & Stability

  • Result Loading Patch: Modified TestResult.read_file to inject default credentials (e.g., password: "-") for MariaDB, PgVector, and Weaviate when loading older result files. This prevents ValidationError when viewing historical data that omitted these fields.
  • Robust Configuration Parsing: Added try-except blocks around db.case_config_cls instantiation to ensure that a single malformed result file doesn't prevent the results page from loading.

4. Streamlit UI Updates

  • Addressed deprecation warnings by replacing use_container_width=True with width="stretch" across all chart and table components.
  • Ensures full compatibility with future Streamlit releases (post 2025-12-31).

Verification Results

  • Pydantic: Confirmed that version 2.12.5 correctly validates all current and legacy configuration models.
  • Weaviate: Verified successful collection creation, data insertion, and search using the v4 client against a Weaviate instance.
  • Compatibility: Confirmed that historical JSON result files for MariaDB and PgVector load correctly on the Results page.
  • UI: Verified that charts and data editors correctly expand to container width using the new stretch parameter.

…ibility. Update weaviate client to use new v4.18.3 API. Minor fixes on CLI
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fer-marino
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alwayslove2013 alwayslove2013 self-requested a review December 19, 2025 09:01
@fer-marino
Copy link
Author

mark it as draft please. There is still more pydantic work to do.

@fer-marino fer-marino marked this pull request as draft December 19, 2025 15:19
… for backward compatibility. Update MariaDB and PostgreSQL HNSW configs with defaults. Simplify MariaDB table creation logic. Upgrade weaviate client to v4.18.3.
@fer-marino fer-marino marked this pull request as ready for review December 20, 2025 12:33
@fer-marino fer-marino changed the title pydantic v2 and weaviate client v4 Pydantic v2 Migration, Weaviate v4 Upgrade, and UI Fixes Dec 20, 2025
@XuanYang-cn XuanYang-cn marked this pull request as draft December 24, 2025 03:54
@XuanYang-cn XuanYang-cn marked this pull request as ready for review December 24, 2025 03:54
@XuanYang-cn
Copy link
Collaborator

@fer-marino great work! Please notify me if it's ready to review

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.

3 participants