• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
amoeba

amoeba

dbc-cdn-freshness

Public
Like
dbc-cdn-freshness
Home
Code
7
.claude
1
.vtignore
AGENTS.md
README.md
adbcDriverChecker.ts
deno.json
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

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:

  • ✅ 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

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

Code
.claude.vtignoreAGENTS.mdREADME.mdadbcDriverChecker.tsdeno.jsonmain.ts
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.