Skip to content

Commit da7690f

Browse files
authored
Merge branch 'main' into renovate/major-github-actions
2 parents 8de2777 + 29dc37e commit da7690f

File tree

8 files changed

+47
-7
lines changed

8 files changed

+47
-7
lines changed

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CLOUD_SQL_POSTGRES_PROJECT=starter-akitsch
2+
CLOUD_SQL_POSTGRES_REGION=us-west2
3+
CLOUD_SQL_POSTGRES_INSTANCE=pg15-pgvector-demo
4+
CLOUD_SQL_POSTGRES_DATABASE=whoop
5+
CLOUD_SQL_POSTGRES_USER=postgres
6+
CLOUD_SQL_POSTGRES_PASSWORD=my-pg-pass

.github/labels.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@
7979

8080
- name: 'status: waiting for response'
8181
color: 8befd7
82-
description: 'Status: reviewer is awaiting feedback or responses from the author before proceeding.'
82+
description: 'Status: reviewer is awaiting feedback or responses from the author before proceeding.'
83+
84+
- name: 'release-please:force-run'
85+
color: bdca82
86+
description: Manually trigger the release please workflow on a PR.

.github/workflows/assign-prs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
name: PR assignment
1616

1717
on:
18-
pull_request:
19-
types: [opened, edited, synchronize, reopened]
18+
pull_request_target:
19+
types: [opened, edited, reopened]
2020

2121
jobs:
2222
auto-assign:
2323
runs-on: ubuntu-latest
2424
permissions:
25+
issues: write
2526
pull-requests: write
2627
steps:
2728
- name: "Auto-assign PR"

.github/workflows/markdown-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2828

2929
- name: Link Checker
30-
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2.6.1
30+
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
3131
with:
3232
# There is no security token. So, it would fail on any links which aren't public.
3333
args: "--verbose --no-progress **/*.md"

.github/workflows/mirror-changelog.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,25 @@ jobs:
8282
// Match and extract changelog item
8383
const itemMatch = trimmedLine.match(/^[*-]\s(.*)$/);
8484
if (itemMatch) {
85-
const originalContent = itemMatch[1];
85+
let originalContent = itemMatch[1];
86+
87+
// This is a two-step process to prevent `release-please` from
88+
// creating mangled, doubly-nested links for PRs.
89+
90+
// STEP 1: CLEAN THE INPUT.
91+
// The source changelog contains a zero-width space as an HTML entity (`​`).
92+
// This breaks the regex in the next step, so we must remove it first.
93+
// E.g., "[#​1770](...)" becomes "[#1770](...)"
94+
originalContent = originalContent.replace(/​/g, '');
95+
96+
// STEP 2: PROTECT THE OUTPUT.
97+
// `release-please` aggressively tries to auto-link any text that looks like `#1234`.
98+
// To prevent this, we insert an invisible Unicode zero-width space (`\u200B`)
99+
// between the '#' and the number in the link text. This breaks the parser's
100+
// pattern matching without changing the visual appearance of the link.
101+
// E.g., "[#1770](...)" becomes "[genai-toolbox#​1770](...)"
102+
originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#\u200B$1]$2');
103+
86104
const lineAsLowerCase = originalContent.toLowerCase();
87105
88106
const hasPrefix = prefixesToFilter.some(prefix => lineAsLowerCase.includes(prefix));

.github/workflows/presubmit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install toolbox binary
3131
run: |
3232
VERSION=$(cat toolbox_version.txt)
33-
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
33+
curl -L -o toolbox "https://storage.googleapis.com/genai-toolbox/v${VERSION}/linux/amd64/toolbox"
3434
chmod +x toolbox
3535
3636
- name: Install Extension

CLOUD-SQL-POSTGRESQL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,14 @@ Make sure to not use the environment variable name like `CLOUD_SQL_POSTGRES_PROJ
8585
**ALWAYS** use the full table name format, `DATABASE_NAME.SCHEMA_NAME.TABLE_NAME` in the generated SQL when using the `execute_sql` or `cloud_sql_postgresql__execute_sql` tool.
8686
* Default to using "public" for the schema name.
8787
* Use command `echo $CLOUD_SQL_POSTGRES_DATABASE` to get the current database value.
88+
89+
## Use google_ml_integration for AI use cases
90+
91+
When working with AI features like vector embeddings in Cloud SQL, leverage the `google_ml_integration` extension. This allows for generating embeddings directly within the database, which is the recommended approach over using third-party embedding models.
92+
93+
Embeddings can be generated using the `embedding()` function. For example: `embedding(<model_name>, <text_column_or_variable>)`.
94+
95+
As an agent, if you do not know which model to use, you should use your tools to search for available and appropriate text embedding models compatible with the `google_ml_integration` extension (e.g., by searching for "Cloud SQL google_ml_integration supported models").
96+
97+
When performing similarity searches, remember to cast the result of the `embedding` function to the `vector` type. For example:
98+
`ORDER BY description_vector <-> embedding(<model_name>, $1)::vector`

toolbox_version.txt

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

0 commit comments

Comments
 (0)