feat(devcontainer): add supervisor feature - #69
Conversation
Add DevContainer feature for installing Dev8 workspace supervisor. The supervisor provides activity monitoring, automated backups, and health reporting for workspaces. - Install supervisor binary from source or GitHub releases - Support configurable version and install path - Include comprehensive README documentation - Compatible with official Microsoft DevContainer images
|
Caution Review failedThe pull request is closed. WalkthroughThis PR introduces a comprehensive DevContainer feature for the Dev8 Workspace Supervisor—a Go-based binary for workspace activity monitoring and backups. It includes a GitHub Actions workflow for building and releasing supervisor binaries across platforms, an installation script with build-from-source fallback, feature documentation, and configuration files. Changes
Sequence DiagramsequenceDiagram
participant User as DevContainer User
participant Script as install.sh
participant Platform as OS/Arch Detection
participant Download as GitHub Releases
participant Source as Build from Source
participant Install as /usr/local/bin
User->>Script: Execute install.sh
Script->>Platform: Detect OS & architecture
Platform-->>Script: Platform identifier
Script->>Download: Attempt download pre-built binary
alt Download Succeeds
Download-->>Script: Binary + checksum verification
Script->>Install: Extract & move binary
Install-->>Script: Installation complete
else Download Fails
Script->>Source: Check for Go
alt Go Not Installed
Source->>Source: Install Go 1.22.0
end
Source->>Source: Clone or locate source code
Source->>Source: Build supervisor binary
Source->>Install: Move compiled binary
Install-->>Script: Installation complete
end
Script->>Script: Verify installation
Script-->>User: Display version & completion details
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add automated CI/CD pipeline to build supervisor binaries for multiple platforms and store them as GitHub Actions artifacts. Changes: - Created .github/workflows/build-supervisor.yml workflow - Multi-arch support (Linux AMD64, ARM64) - Builds on push to main and PRs - Creates version manifest - 90-day artifact retention - Build summary output - Updated supervisor install script to download from artifacts - Prefer pre-built binaries from GitHub Actions - Fallback to building from source if needed - Support for GITHUB_TOKEN authentication - Automatic architecture detection - Enhanced error handling - Updated documentation - Installation methods explanation - Authentication requirements - Binary distribution details - Development workflow Benefits: - Fast installation (<10 seconds vs 2-3 minutes) - No need to install Go in containers - Consistent binary versions - Private artifact storage (not exposed publicly) - Multi-architecture support out of the box The supervisor binary remains internal and is not published as a public release, keeping it accessible only to team members with repository access.
Replace workflow artifacts approach with consistent GitHub release tag for zero-maintenance binary distribution. Key Changes: - Workflow now creates/updates 'supervisor-latest' release - Release tag stays constant, only binary content updates - Consistent download URLs that never change - No authentication required for downloads - Install script simplified to use direct release URLs - Automatic fallback to source build if download fails Benefits: - **Zero maintenance**: URLs never need updating - **Consistent URLs**: Perfect for DevContainer features - AMD64: .../supervisor-latest/supervisor-linux-amd64 - ARM64: .../supervisor-latest/supervisor-linux-arm64 - **No tokens needed**: Public release URLs work without auth - **Automatic updates**: Each merge to main updates the release - **Reliable**: Fallback to source build if needed Workflow Changes: - Deletes existing 'supervisor-latest' release on each run - Creates new release with same tag name - Uploads fresh binaries with checksums - URLs remain constant across all builds - Only updates on push to main (not PRs) Install Script Changes: - Downloads from consistent release URL - Verifies checksums when available - Shows download progress - Graceful fallback to source build - No GitHub token required This approach ensures the DevContainer feature install script never needs updates - it always downloads the latest binary from the same URL!
Summary
Add DevContainer feature for installing the Dev8 workspace supervisor binary with consistent GitHub release URLs that never change.
🎯 Key Innovation: Zero-Maintenance URLs
The supervisor binary is distributed via a constant release tag (
supervisor-latest) that gets updated automatically on each merge tomain:Consistent URLs (Never Change!):
https://github.com/VAIBHAVSING/Dev8.dev/releases/download/supervisor-latest/supervisor-linux-amd64https://github.com/VAIBHAVSING/Dev8.dev/releases/download/supervisor-latest/supervisor-linux-arm64Why This Matters
What This Adds
1. DevContainer Feature
2. CI/CD Pipeline
GitHub Actions workflow (
.github/workflows/build-supervisor.yml):mainsupervisor-latestrelease3. Installation Methods
Method 1: Pre-built Binary (Primary)
Method 2: Build from Source (Fallback)
Technical Implementation
Workflow Strategy
Install Script Logic
Usage Example
{ "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", "features": { "ghcr.io/dev8-community/devcontainer-features/supervisor:1": { "version": "latest" } } }That's it! No tokens, no changing URLs, no maintenance needed.
Benefits
For DevContainer Features
For CI/CD
For Users
How It Works
Comparison: Before vs After
Before (Artifacts Approach)
After (Consistent Release Approach)
Testing
Test Locally
{ "features": { "./packages/devcontainer-features/src/supervisor": {} } }After Merge to Main
The workflow will automatically:
supervisor-latestreleaseFiles Changed
.github/workflows/build-supervisor.yml- CI/CD pipeline with consistent releasepackages/devcontainer-features/src/supervisor/install.sh- Simple release URL downloaderpackages/devcontainer-features/src/supervisor/README.md- Updated documentationpackages/devcontainer-features/src/supervisor/devcontainer-feature.json- Feature definitionPart of Stacked PRs
This is PR #1 in the DevContainer features stack:
Ready for merge! This establishes a maintenance-free binary distribution system for internal tools.
Summary by CodeRabbit