mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-03 11:45:10 -05:00
## Description Implements the 'postgres-upgrade-precheck' tool to allow users to validate instance readiness for major version upgrades for CloudSQL PostgreSQL. This includes the tool implementation, unit tests for YAML parsing, integration tests for tool invocation, and documentation. The tool is also added to the CloudSQL PostgreSQL prebuilt set. TEST output: <img width="3406" height="1646" alt="image" src="https://github.com/user-attachments/assets/6abaa535-285d-4645-9dd3-7ebcd447d448" /> <img width="3532" height="1490" alt="image" src="https://github.com/user-attachments/assets/4d512af1-51fd-4187-b80f-be13198aba68" /> ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #1721 --------- Co-authored-by: Averi Kitsch <akitsch@google.com>
2.0 KiB
2.0 KiB
title, type, weight, description
| title | type | weight | description |
|---|---|---|---|
| postgres-upgrade-precheck | docs | 11 | Perform a pre-check for a Cloud SQL for PostgreSQL major version upgrade. |
The postgres-upgrade-precheck tool initiates a pre-check on a Cloud SQL for PostgreSQL
instance to assess its readiness for a major version upgrade using the Cloud SQL Admin API.
It helps identify potential incompatibilities or issues before starting the actual upgrade process.
{{< notice info >}}
This tool uses a source of kind cloud-sql-admin.
{{< /notice >}}
Tool Inputs
Example
tools:
postgres-upgrade-precheck:
kind: postgres-upgrade-precheck
source: cloud-sql-admin-source
description: "Checks if a Cloud SQL PostgreSQL instance is ready for a major version upgrade to the specified target version."
Reference
| field | type | required | description |
|---|---|---|---|
| kind | string | true | Must be "postgres-upgrade-precheck". |
| source | string | true | The name of the cloud-sql-admin source to use. |
| description | string | false | A description of the tool. |
| parameter | type | required | description |
|---|---|---|---|
| project | string | true | The project ID containing the instance. |
| instance | string | true | The name of the Cloud SQL instance to check. |
| targetDatabaseVersion | string | false | The target PostgreSQL major version for the upgrade (e.g., POSTGRES_18). If not specified, defaults to the PostgreSQL 18. |