Skip to content

Add alloydb vector search codeowners#14441

Closed
vinay0410 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
vinay0410:add-alloydb-vector-search-codeowners
Closed

Add alloydb vector search codeowners#14441
vinay0410 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
vinay0410:add-alloydb-vector-search-codeowners

Conversation

@vinay0410

Copy link
Copy Markdown
Contributor

Description

Fixes #

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

Added @GoogleCloudPlatform/alloydb-vector-search-docs as a co-owner of the /alloydb/ directory.
@vinay0410
vinay0410 requested review from a team as code owners July 21, 2026 06:35
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: notebooks Issues related to the Agent Platform Workbench API. labels Jul 21, 2026

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

Copy link
Copy Markdown
Contributor

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 adds the alloydb-vector-search-docs team to the CODEOWNERS file for the alloydb directory and introduces a new test, test_alloydb_vector_search_benchmark, in alloydb/notebooks/e2e_test.py to run a benchmark notebook with reduced parameters. Feedback suggests making the new test synchronous as it lacks asynchronous operations, and using repr(password) instead of string interpolation to safely handle special characters in passwords.

Comment on lines +157 to +194
@pytest.mark.asyncio
async def test_alloydb_vector_search_benchmark(
project_id: str,
cluster_name: str,
instance_name: str,
region: str,
database_name: str,
password: str,
) -> None:
# Run the benchmark notebook with significantly reduced parameters
# to allow CI to complete quickly without OOMs or timeouts
conftest.run_notebook(
"alloydb_vector_search_benchmark.ipynb",
variables={
"project_id": project_id,
"region": region,
"cluster_id": cluster_name,
"instance_id": instance_name,
"db_name": database_name,
"db_user": "postgres",
"test_queries": 10,
},
preprocess=preprocess,
skip_shell_commands=True,
replace={
(
"db_pass = getpass.getpass("
'"🔑 Enter Database Password for AlloyDB: ")'
): f"db_pass = '{password}'",
"train_data = f['train'][:]": "train_data = f['train'][:1000]",
"test_data = f['test'][:]": "test_data = f['test'][:100]",
"neighbors_data = f['neighbors'][:]": (
"neighbors_data = f['neighbors'][:100]"
),
"ef_values = [40, 100, 200, 400, 800]": "ef_values = [40]",
},
until_end=True,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The test function test_alloydb_vector_search_benchmark is defined as an asynchronous function (async def) and decorated with @pytest.mark.asyncio, but it does not contain any await expressions or asynchronous operations. Making it synchronous simplifies the test and avoids unnecessary async overhead.

Additionally, using f"db_pass = '{password}'" can cause syntax errors or test failures if the password contains single quotes or backslashes. Using repr(password) is safer and more robust as it automatically handles escaping and quotes.

def test_alloydb_vector_search_benchmark(
    project_id: str,
    cluster_name: str,
    instance_name: str,
    region: str,
    database_name: str,
    password: str,
) -> None:
    # Run the benchmark notebook with significantly reduced parameters
    # to allow CI to complete quickly without OOMs or timeouts
    conftest.run_notebook(
        "alloydb_vector_search_benchmark.ipynb",
        variables={
            "project_id": project_id,
            "region": region,
            "cluster_id": cluster_name,
            "instance_id": instance_name,
            "db_name": database_name,
            "db_user": "postgres",
            "test_queries": 10,
        },
        preprocess=preprocess,
        skip_shell_commands=True,
        replace={
            (
                "db_pass = getpass.getpass("
                '"🔑 Enter Database Password for AlloyDB: ")'
            ): f"db_pass = {repr(password)}",
            "train_data = f['train'][:]": "train_data = f['train'][:1000]",
            "test_data = f['test'][:]": "test_data = f['test'][:100]",
            "neighbors_data = f['neighbors'][:]": (
                "neighbors_data = f['neighbors'][:100]"
            ),
            "ef_values = [40, 100, 200, 400, 800]": "ef_values = [40]",
        },
        until_end=True,
    )

@vinay0410 vinay0410 closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: notebooks Issues related to the Agent Platform Workbench API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant