Skip to content

Commit 7d22543

Browse files
authored
chore: add developer instructions (#32)
1 parent ed15751 commit 7d22543

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

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.

0 commit comments

Comments
 (0)