A Val.town script that monitors dbc-cdn.columnar.tech for available ADBC drivers and compares them against upstream releases to detect outdated versions.
- π 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
-
Create a new Val: Go to val.town and create a new Val
-
Copy the code: Copy the contents of
adbcDriverChecker.tsinto your Val -
Save the Val: Your Val will be automatically assigned a URL
-
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.)
-
Email configuration: Val.town's
email()function sends to your verified Val.town email by default
-
CDN Scraping: Fetches the HTML from dbc-cdn.columnar.tech and extracts driver versions using regex patterns
-
Version Checking: For each driver, queries the upstream release API (currently GitHub for DuckDB)
-
Comparison: Normalizes version strings (removes 'v' prefix) and compares CDN vs upstream
-
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
Currently implemented:
- β DuckDB - Checks against github.com/duckdb/duckdb/releases
Detected on CDN (ready to add):
- β³ Flight SQL
- β³ MySQL
- β³ SQLite
- β³ PostgreSQL
- β³ SQL Server (mssql)
- β³ Amazon Redshift
- β³ Google BigQuery
- β³ Snowflake
- β³ Trino
Most ADBC drivers are part of the Apache Arrow ADBC project. To add more drivers:
-
Find the upstream release source (likely
https://github.com/apache/arrow-adbc/releases) -
Add a new checker function similar to
getDuckDBLatestVersion() -
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;
}
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.
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
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)
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.).
MIT