Skip to content

Conversation

@AayushTyagi1
Copy link
Contributor

@AayushTyagi1 AayushTyagi1 commented Oct 24, 2025

  • Provide Index and Index Definitions
  • Restrict MCP Server to Python versions 3.10-3.13
  • Include Certs for Capella environment

@AayushTyagi1 AayushTyagi1 requested a review from nithishr October 24, 2025 09:21
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @AayushTyagi1, 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 significantly enhances the index management capabilities by introducing a new tool to list and define Couchbase indexes. It provides a structured way to query index metadata, apply filters for specific buckets, scopes, or collections, and automatically generate the CREATE INDEX statements for GSI indexes. This feature is crucial for developers and administrators to gain deeper insights into their database's indexing strategy, facilitating better performance tuning and schema understanding.

Highlights

  • New Index Listing Tool: A new list_indexes function has been introduced, allowing users to retrieve a comprehensive list of indexes present in the Couchbase cluster.
  • Flexible Index Filtering: The list_indexes tool supports optional filtering by bucket, scope, and collection, enabling targeted inspection of indexes.
  • Automatic Index Definition Generation: For GSI (Global Secondary Index) indexes, the tool can generate the corresponding CREATE INDEX statement, providing clear definitions.
  • Updated Documentation: The README.md has been updated to reflect the new capability of listing indexes and their definitions, enhancing user understanding.
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 introduces a new tool to list indexes from the Couchbase cluster, with options to filter by bucket, scope, and collection. The implementation is well-structured, adding a new utility function to generate CREATE INDEX statements and integrating the new tool into the existing framework.

My review includes a few suggestions to improve robustness and maintainability:

  • Adding validation for required data in the index definition generation to prevent potential errors.
  • Enhancing error logging to include stack traces for better debugging.
  • Correcting a typo in a new utility file's name.

Overall, this is a great addition to the project's capabilities.

url,
params=params,
auth=(username, password),
verify=False, # Disable SSL verification for self-signed certs
Copy link
Contributor

Choose a reason for hiding this comment

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

This is also something we should not do ideally.
We should figure out the right certificate to use from the settings or use the default one for Capella Prod env.

Copy link
Contributor

Choose a reason for hiding this comment

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

A good test for this would be the following:

  • Test CB Server locally
  • Test Capella Dev & Prod environment
  • Test CB Server locally with user definted certs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tested locally
Capella Dev
Capella Prod
Third case not done but tested non prod with user defined cert and it worked

@AayushTyagi1 AayushTyagi1 requested a review from nithishr October 29, 2025 12:17
The host extracted from the connection string
"""
# Parse the connection string
parsed = urlparse(connection_string)
Copy link
Contributor

Choose a reason for hiding this comment

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

Connection strings with multiple hosts will currently fail
connection_string = "couchbases://192.168.106.130,192.168.106.129,192.168.106.128" will call all 3 nodes when it should only call one of the nodes (ideally the one with index service running but for simplicity we can ignore it for now & handle it later if required)
Fetching indexes from REST API: https://192.168.106.130,192.168.106.129,192.168.106.128:19102/getIndexStatus

@AayushTyagi1 AayushTyagi1 requested a review from nithishr November 3, 2025 18:10
@AayushTyagi1 AayushTyagi1 requested a review from nithishr November 3, 2025 18:17
@AayushTyagi1 AayushTyagi1 merged commit b2bb3a7 into main Nov 3, 2025
6 checks passed
@nithishr nithishr deleted the feat/DA-1171-list-index-names-and-definitions branch November 12, 2025 15:09
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