ADBC CDN Freshness Checker

A Val.town script that monitors dbc-cdn.columnar.tech for available ADBC drivers and compares them against upstream releases to detect outdated versions.

Features

  • šŸ” Automatically scrapes the CDN to find all available drivers
  • šŸ”„ Checks upstream release systems (GitHub) for latest versions
  • šŸ“§ Sends email alerts when drivers are out of date
  • ā° Can be scheduled to run periodically on Val.town
  • šŸŽÆ Currently supports DuckDB with extensible architecture for more drivers

Setup on Val.town

  1. Create a new Val: Go to val.town and create a new Val

  2. Copy the code: Copy the contents of adbcDriverChecker.ts into your Val

  3. Save the Val: Your Val will be automatically assigned a URL

  4. Schedule it: Use Val.town's scheduling feature to run it periodically

    • Click "Schedule" in the Val editor
    • Set your preferred interval (e.g., daily at 9 AM, every 6 hours, etc.)
  5. Email configuration: Val.town's email() function sends to your verified Val.town email by default

How It Works

  1. CDN Scraping: Fetches the HTML from dbc-cdn.columnar.tech and extracts driver versions using regex patterns

  2. Version Checking: For each driver, queries the upstream release API (currently GitHub for DuckDB)

  3. Comparison: Normalizes version strings (removes 'v' prefix) and compares CDN vs upstream

  4. Alerting: If any drivers are outdated, sends an email with:

    • Which drivers are out of date
    • Current CDN version vs latest upstream version
    • Links to check releases manually

Supported Drivers

Currently implemented:

Detected on CDN (ready to add):

  • ā³ Flight SQL
  • ā³ MySQL
  • ā³ SQLite
  • ā³ PostgreSQL
  • ā³ SQL Server (mssql)
  • ā³ Amazon Redshift
  • ā³ Google BigQuery
  • ā³ Snowflake
  • ā³ Trino

Adding More Drivers

Most ADBC drivers are part of the Apache Arrow ADBC project. To add more drivers:

  1. Find the upstream release source (likely https://github.com/apache/arrow-adbc/releases)

  2. Add a new checker function similar to getDuckDBLatestVersion()

  3. Add the check to the checkDrivers() function

Example for Apache Arrow ADBC drivers:

async function getArrowADBCLatestVersion(): Promise<string> { const response = await fetch( "https://api.github.com/repos/apache/arrow-adbc/releases/latest", { headers: { "Accept": "application/vnd.github+json", "User-Agent": "ADBC-CDN-Checker", }, } ); const data = await response.json(); return data.tag_name; }

Testing Locally

You can test the script locally with Deno:

deno run --allow-net adbcDriverChecker.ts

Note: The email function is Val.town-specific, so you'll need to mock it or comment it out for local testing.

Email Alert Format

When drivers are outdated, you'll receive an email like:

āš ļø  ADBC Driver Update Alert

1 driver(s) are out of date:

āŒ DuckDB
   CDN Version: v1.4.1
   Latest Version: v1.4.2
   Check: https://github.com/duckdb/duckdb/releases

---
Checked at: 2025-11-12T10:30:00.000Z
CDN: https://dbc-cdn.columnar.tech

Version Comparison Logic

The script:

  • Normalizes versions by removing 'v' prefixes (v1.4.2 → 1.4.2)
  • Compares strings for exact matches
  • Considers any mismatch as "outdated" (including if CDN is ahead)

CDN Structure

The CDN uses this structure:

dbc-cdn.columnar.tech/
ā”œā”€ā”€ duckdb/
│   ā”œā”€ā”€ v1.4.0/
│   ā”œā”€ā”€ v1.4.1/
│   └── v1.4.2/
ā”œā”€ā”€ postgresql/
│   └── 1.8.0/
└── ...

Each version directory contains platform-specific binaries (linux_amd64, macos_arm64, etc.).

License

MIT