Skip to content

feat(infra): add binary mirroring workflows and tool#166

Merged
CalvinAllen merged 5 commits into
mainfrom
feat/infra/binary-mirroring
Dec 16, 2025
Merged

feat(infra): add binary mirroring workflows and tool#166
CalvinAllen merged 5 commits into
mainfrom
feat/infra/binary-mirroring

Conversation

@CalvinAllen

@CalvinAllen CalvinAllen commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Summary

Add infrastructure to mirror all runtime binaries to builds.dtvem.io and generate manifests from R2:

  • Mirror tool (scripts/mirror-binaries): Downloads from upstream and uploads to R2 with metadata
  • Manifest generator (scripts/generate-manifests-from-r2): Scans R2 and generates manifests
  • mirror-all.yml: Bulk migration workflow for initial population
  • mirror-sync.yml: Daily sync workflow to catch new upstream versions
  • generate-manifests-from-r2.yml: Generates manifests and deploys to R2

Scope

Based on current manifests:

Runtime Versions Downloads
Node.js 703 3,922
Python 132 482
Ruby 98 427
Total 933 4,831

Features

  • Parallel downloads with configurable workers
  • SHA256 checksum verification with source tracking (upstream or dtvem)
  • Metadata files (.meta.json) stored alongside binaries in R2
  • Sync-only mode (skip existing files in R2)
  • Dry-run mode for testing
  • Matrix strategy to parallelize by runtime
  • Automatic manifest generation after mirroring
  • Immediate R2 manifest deployment + PR for embedded manifests

Workflow Chain

Mirror Sync (daily) or Mirror All (manual)
         ↓
Generate Manifests from R2 (automatic)
         ↓
├─ Deploy manifests to R2 (immediate)
└─ Create PR for embedded manifests

Test Plan

After merging:

  1. Run "Mirror All Binaries" workflow with dry_run: true to verify
  2. Run "Mirror All Binaries" workflow for real to populate R2
  3. Verify files at builds.dtvem.io
  4. Verify manifest generation triggers and creates PR

Closes #167

Add infrastructure to mirror all runtime binaries to builds.dtvem.io:

- scripts/mirror-binaries: Go tool to download from upstream and upload to R2
  - Supports parallel downloads with configurable workers
  - Verifies SHA256 checksums when available
  - Sync-only mode to skip files already in R2
  - Dry-run mode for testing

- mirror-all.yml: Bulk migration workflow
  - Matrix strategy to parallelize by runtime
  - Can run for specific runtime or all at once
  - Supports dry-run mode

- mirror-sync.yml: Periodic sync workflow
  - Triggers after manifest deployments
  - Only uploads new files not already in R2
  - Can also be triggered manually

This enables dtvem to be the single source for all runtime binaries,
improving reliability and consistency.

Part of #159
- Add generate-manifests-from-r2 tool to scan R2 bucket and generate manifests
- Update mirror tool to write .meta.json files with checksum source
- Add sha256_source field to manifest schema ("upstream" or "dtvem")
- Add SHA256Source field to Go manifest.Download struct
- Update mirror-sync workflow to weekly schedule (not manifest-triggered)
- Add generate-manifests-from-r2.yml workflow
@CalvinAllen CalvinAllen merged commit 15ee7df into main Dec 16, 2025
12 checks passed
@CalvinAllen CalvinAllen deleted the feat/infra/binary-mirroring branch December 16, 2025 19:26
@CalvinAllen

Copy link
Copy Markdown
Contributor Author

/release-note We are now hosting all of the binaries for all supported runtimes, mirrored from upstream sources where necessary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(infra): binary mirroring and manifest generation from R2

1 participant