Skip to content

chore: bump cloud-sql-proxy to version 2 - #9

Merged
ashwin153 merged 3 commits into
mainfrom
ashwin153-patch-1
Feb 19, 2026
Merged

chore: bump cloud-sql-proxy to version 2#9
ashwin153 merged 3 commits into
mainfrom
ashwin153-patch-1

Conversation

@ashwin153

@ashwin153 ashwin153 commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updated the Cloud SQL Proxy installation script to explicitly fetch the latest v2.x release instead of the absolute latest release. This ensures compatibility with version 2 of the Cloud SQL Proxy.

Key changes:

  • Switched from /releases/latest endpoint to /releases?per_page=20 to get a list of recent releases
  • Added filtering to select only v2.x releases using grep '"v2\.'
  • Improved grep pattern specificity by quoting "tag_name" to avoid false matches

The change is straightforward and maintains backward compatibility for users who specify a version explicitly, while ensuring that users with version: "latest" will get the latest v2.x release rather than potentially getting a v1.x release if it was marked as latest.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The change is well-scoped and addresses a specific version targeting issue. The script logic is sound, and the filtering approach is reasonable. Score is 4 instead of 5 because there's a minor edge case where if no v2 releases exist in the first 20 results, the VERSION variable could be empty, leading to a potential failure at download time (though this is unlikely given cloud-sql-proxy has many v2 releases)
  • No files require special attention

Important Files Changed

Filename Overview
src/cloud-sql-proxy/install.sh Version detection updated to fetch latest v2.x release instead of absolute latest, ensuring compatibility with v2 API

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Start: Check VERSION variable] --> B{VERSION == 'latest'?}
    B -->|Yes| C[Fetch releases list from GitHub API<br/>per_page=20]
    B -->|No| H[Use specified VERSION]
    C --> D[Filter for 'tag_name' fields]
    D --> E[Filter for v2.x releases only<br/>grep 'v2\.']
    E --> F[Take first result<br/>head -1]
    F --> G[Extract version number<br/>remove 'v' prefix]
    G --> H
    H --> I{Check architecture}
    I -->|x86_64| J[Set PLATFORM=amd64]
    I -->|aarch64/armv8| K[Set PLATFORM=arm64]
    I -->|Other| L[Error: unsupported architecture]
    J --> M[Download cloud-sql-proxy binary]
    K --> M
    M --> N[Make executable & create symlink]
    N --> O[End]
    L --> P[Exit with error]
Loading

Last reviewed commit: 15a03ec

@ashwin153
ashwin153 enabled auto-merge (squash) February 19, 2026 21:22
@ashwin153
ashwin153 merged commit 8d50336 into main Feb 19, 2026
3 checks passed
@ashwin153
ashwin153 deleted the ashwin153-patch-1 branch February 19, 2026 21:34
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.

1 participant