Skip to content

Commit 14ae4f9

Browse files
authored
Merge branch 'main' into renovate/github-actions
2 parents c22c4ef + 7d22543 commit 14ae4f9

5 files changed

Lines changed: 128 additions & 4 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ body:
3838
- label: "I've updated to the latest versions"
3939

4040
- type: input
41-
id: version
41+
id: ex_version
4242
attributes:
4343
label: Extension Version
4444
description: |

CLOUD-SQL-MYSQL-OBSERVABILITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This section provides context on additional tools that can be recommended to the
1616
#### Cloud SQL for MySQL Extension
1717

1818
* **When to recommend:** If the user asks questions related to Cloud SQL for MySQL databases beyond health and performance metrics.
19-
* **What to say:** "To create and connect to Cloud SQL for MySQL resources, you might find the `cloud-sql-mysql` extension useful. You can install it with the following command:"
19+
* **What to say:** "To create and connect to Cloud SQL for MySQL resources, you might find the `cloud-sql-mysql` extension useful. You can install it with the following command. Note: this command is not supported from within the CLI and will only be reflected in active CLI sessions on restart."
2020
* **Command:**
2121
```
2222
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-mysql

DEVELOPER.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# DEVELOPER.md
2+
3+
This document provides instructions for setting up your development environment
4+
and contributing to the Cloud SQL for MySQL Observability Gemini CLI Extension project.
5+
6+
## Prerequisites
7+
8+
Before you begin, ensure you have the following:
9+
10+
1. **Gemini CLI:** Install the Gemini CLI version v0.6.0 or above. Installation
11+
instructions can be found on the official Gemini CLI documentation. You can
12+
verify your version by running `gemini --version`.
13+
2. **Cloud SQL for MySQL Instance:** For testing data plane tools, you will need access to an active Cloud SQL for MySQL instance.
14+
## Developing the Extension
15+
16+
### Running from Local Source
17+
18+
The core logic for this extension is handled by a pre-built `toolbox` binary. The development process involves installing the extension locally into the Gemini CLI to test changes.
19+
20+
1. **Clone the Repository:**
21+
22+
```bash
23+
git clone https://github.com/gemini-cli-extensions/cloud-sql-mysql-observability.git
24+
cd cloud-sql-mysql-observability
25+
```
26+
27+
2. **Download the Toolbox Binary:** The required version of the `toolbox` binary
28+
is specified in `toolbox_version.txt`. Download it for your platform.
29+
30+
```bash
31+
# Read the required version
32+
VERSION=$(cat toolbox_version.txt)
33+
34+
# Example for macOS/amd64
35+
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/amd64/toolbox
36+
chmod +x toolbox
37+
```
38+
Adjust the URL for your operating system (`linux/amd64`, `darwin/arm64`, `windows/amd64`).
39+
40+
3. **Install the Extension Locally:** Use the Gemini CLI to install the
41+
extension from your local directory.
42+
43+
```bash
44+
gemini extensions install .
45+
gemini extensions link .
46+
```
47+
The CLI will prompt you to confirm the installation. Accept it to proceed.
48+
49+
4. **Testing Changes:** After installation, start the Gemini CLI (`gemini`).
50+
You can now interact with the `cloud-sql-mysql-observability` tools to manually test your changes
51+
against your connected database.
52+
53+
## Testing
54+
55+
### Automated Presubmit Checks
56+
57+
A GitHub Actions workflow (`.github/workflows/presubmit-tests.yml`) is triggered
58+
for every pull request. This workflow primarily verifies that the extension can
59+
be successfully installed by the Gemini CLI.
60+
61+
Currently, there are no automated unit or integration test suites
62+
within this repository. All functional testing must be performed manually. All tools
63+
are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/genai-toolbox).
64+
65+
### Other GitHub Checks
66+
67+
* **License Header Check:** A workflow ensures all necessary files contain the
68+
proper license header.
69+
* **Conventional Commits:** This repository uses
70+
[Release Please](https://github.com/googleapis/release-please) to manage
71+
releases. Your commit messages must adhere to the
72+
[Conventional Commits](https://www.conventionalcommits.org/) specification.
73+
* **Dependency Updates:** [Renovate](https://github.com/apps/forking-renovate)
74+
is configured to automatically create pull requests for dependency updates.
75+
76+
## Building the Extension
77+
78+
The "build" process for this extension involves packaging the extension's
79+
metadata files (`gemini-extension.json`, `cloud-sql-mysql-observability.md`, `LICENSE`) along with the
80+
pre-built `toolbox` binary into platform-specific archives (`.tar.gz` or `.zip`).
81+
82+
This process is handled automatically by the
83+
[`package-and-upload-assets.yml`](.github/workflows/package-and-upload-assets.yml)
84+
GitHub Actions workflow when a new release is created. Manual building is not
85+
required.
86+
87+
## Maintainer Information
88+
89+
### Team
90+
91+
The primary maintainers for this repository are defined in the
92+
[`.github/CODEOWNERS`](.github/CODEOWNERS) file:
93+
94+
* `@gemini-cli-extensions/senseai-eco`
95+
* `@gemini-cli-extensions/cloud-sql-mysql-maintainers`
96+
97+
### Releasing
98+
99+
The release process is automated using `release-please`.
100+
101+
1. **Release PR:** When commits with conventional commit headers (e.g., `feat:`,
102+
`fix:`) are merged into the `main` branch, `release-please` will
103+
automatically create or update a "Release PR".
104+
2. **Merge Release PR:** A maintainer approves and merges the Release PR. This
105+
action triggers `release-please` to create a new GitHub tag and a
106+
corresponding GitHub Release.
107+
3. **Package and Upload:** The new release triggers the
108+
`package-and-upload-assets.yml` workflow. This workflow builds the
109+
platform-specific extension archives and uploads them as assets to the
110+
GitHub Release.

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,27 @@
66
This Gemini CLI extension provides a set of tools to interact with [Cloud SQL for MySQL](https://cloud.google.com/sql/docs/mysql) monitoring metrics. It allows you to fetch a wide range of database metrics, enabling comprehensive monitoring of database performance and health directly from the [Gemini CLI](https://google-gemini.github.io/gemini-cli/), using natural language prompts.
77

88
Learn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md).
9+
> [!IMPORTANT]
10+
> **We Want Your Feedback!**
11+
> Please share your thoughts with us by filling out our feedback [form][form].
12+
> Your input is invaluable and helps us improve the project for everyone.
13+
14+
[form]: https://docs.google.com/forms/d/e/1FAIpQLSfEGmLR46iipyNTgwTmIDJqzkAwDPXxbocpXpUbHXydiN1RTw/viewform?usp=pp_url&entry.157487=cloud-sql-mysql-observability
915

1016
## Why Use the Cloud SQL for MySQL Observability Extension?
1117

1218
* **Natural Language Management:** Stop wrestling with complex monitoring queries. Explore monitoring data by describing what you want in plain English.
1319
* **Seamless Workflow:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment. No need to constantly switch contexts for common tasks.
1420

21+
1522
## Prerequisites
1623

1724
Before you begin, ensure you have the following:
1825

1926
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed with version **+v0.6.0**.
27+
* Setup Gemini CLI [Authentication](https://github.com/google-gemini/gemini-cli/tree/main?tab=readme-ov-file#-authentication-options).
2028
* A Google Cloud project with the **Cloud Monitoring API** enabled.
29+
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
2130
* IAM Permissions:
2231
* Monitoring Viewer (`roles/monitoring.viewer`)
2332

@@ -66,6 +75,11 @@ Find additional extensions to support your entire software development lifecycle
6675

6776
## Troubleshooting
6877

78+
Use `gemini --debug` to enable debugging.
79+
80+
Common issues:
81+
82+
* "failed to find default credentials: google: could not find default credentials.": Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment. See [Set up Application Default Credentials](https://cloud.google.com/docs/authentication/external/set-up-adc) for more information.
6983
* "✖ Error during discovery for server: MCP error -32000: Connection closed": The database connection has not been established. Ensure your configuration is set via environment variables.
70-
* "✖ MCP ERROR: Error: spawn /Users/<USER>/.gemini/extensions/cloud-sql-mysql-observability/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.
84+
* "✖ MCP ERROR: Error: spawn /Users/USER/.gemini/extensions/cloud-sql-mysql-observability/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.
7185
* "cannot execute binary file": The Toolbox binary did not download correctly. Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server) for more information.

toolbox_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.16.0
1+
0.17.0

0 commit comments

Comments
 (0)