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