Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
79 changes: 79 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Bug Report
description: Report a bug or unexpected behavior in Proto Fleet
labels: ["bug"]
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: preconditions
attributes:
label: Preconditions
description: Any relevant conditions or setup required to reproduce (e.g., number of miners, network conditions, specific configuration).
placeholder: "e.g., At least 10 miners added, unstable network connection"
validations:
required: false

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: true

- type: input
id: version
attributes:
label: Proto Fleet version
description: The version of Proto Fleet you are running (e.g., v1.2.3 or commit SHA).
placeholder: v1.0.0
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: What environment are you running Proto Fleet in?
placeholder: |
OS: Ubuntu 22.04
Browser: Chrome 120
Docker: 24.0.7
validations:
required: false

- type: textarea
id: logs
attributes:
label: Logs
description: Paste any relevant log output.
render: shell
validations:
required: false

- type: textarea
id: screenshots
attributes:
label: Screenshots & screen recordings
description: If applicable, add screenshots or screen recordings to help explain the problem.
validations:
required: false
10 changes: 7 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: ❓ Questions and Help 🤔
url: https://discord.gg/block-opensource (/add your discord channel if applicable)
about: This issue tracker is not for support questions. Please refer to the community for more help.
- name: Questions & Discussion
url: https://github.com/block/proto-fleet/discussions
about: Ask questions and discuss ideas in GitHub Discussions
- name: Security Vulnerabilities
url: https://github.com/block/proto-fleet/blob/main/SECURITY.md
about: Report security vulnerabilities via our security policy
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Feature Request
description: Suggest a new feature or improvement for Proto Fleet
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem or motivation
description: Describe the problem you'd like solved or the motivation behind this request.
placeholder: "As a fleet operator, I need to ___ because ___"
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: Describe the solution you'd like to see.
validations:
required: true

- type: checkboxes
id: duplicate-check
attributes:
label: Duplicate check
options:
- label: I have searched existing issues and this is not a duplicate
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Describe any alternative solutions or features you've considered.
validations:
required: false

- type: dropdown
id: component
attributes:
label: Component
description: Which part of Proto Fleet does this relate to?
options:
- Client (Web UI)
- Server (Go backend)
- ASIC Plugin (asicrs/Rust)
- Protobufs/API
- Docker/Deployment
- Other
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context, mockups, or screenshots about the feature request.
validations:
required: false
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/miner-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Miner Compatibility Issue
description: Report a compatibility issue with a specific miner model or firmware
labels: ["miner-compatibility"]
body:
- type: input
id: miner-model
attributes:
label: Miner model
description: The make and model of the miner.
placeholder: "e.g., Antminer S21, Whatsminer M50S"
validations:
required: true

- type: input
id: firmware-version
attributes:
label: Firmware version
description: The firmware running on the miner.
placeholder: "e.g., stock firmware 2024.01, Braiins OS+ 23.12"
validations:
required: true

- type: textarea
id: description
attributes:
label: Describe the issue
description: A clear description of the compatibility issue you encountered.
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: true

- type: input
id: version
attributes:
label: Proto Fleet version
description: The version of Proto Fleet you are running (e.g., v1.2.3 or commit SHA).
placeholder: v1.0.0
validations:
required: true

- type: textarea
id: logs
attributes:
label: Logs or telemetry output
description: Paste any relevant logs or telemetry output from the miner or Proto Fleet.
render: shell
validations:
required: false
129 changes: 129 additions & 0 deletions .github/actions/deploy-protofleet/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Deploy ProtoFleet
description: Deploy ProtoFleet deployment bundle to a target environment

inputs:
artifact_name:
description: 'Name of the deployment bundle artifact'
required: true
install_dir:
description: 'Installation directory (defaults to $HOME/proto-fleet)'
required: false
default: ''

runs:
using: composite
steps:
- name: Clean up old deployment bundles
shell: bash
run: |
echo "Cleaning up old deployment bundles from /tmp..."
rm -f /tmp/proto-fleet*.tar.gz
echo "Cleanup complete"

- name: Download deployment bundle
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.artifact_name }}
path: /tmp

- name: Deploy ProtoFleet
shell: bash
run: |
set -e

# Determine installation directory
INSTALL_DIR="${{ inputs.install_dir }}"
if [ -z "$INSTALL_DIR" ]; then
INSTALL_DIR="$HOME/proto-fleet"
fi

echo "Installing ProtoFleet to: $INSTALL_DIR"

# Create installation directory
mkdir -p "$INSTALL_DIR"

# Check if there's an existing .env file to preserve
ENV_FILE="$INSTALL_DIR/deployment/server/influx_config/.env"
if [ -f "$ENV_FILE" ]; then
echo "Backing up existing .env file..."
cp "$ENV_FILE" /tmp/.env.backup
fi

# Find the deployment bundle (prioritize versioned releases, then dev builds)
# List all potential bundles for debugging
echo "Looking for deployment bundle in /tmp..."
ls -lh /tmp/proto-fleet*.tar.gz 2>/dev/null || echo "No proto-fleet bundles found yet"

# Prefer versioned bundles (proto-fleet-v1.2.3.tar.gz) over dev builds (proto-fleet-deployment.tar.gz)
BUNDLE_FILE=$(find /tmp -maxdepth 1 -name "proto-fleet-v*.tar.gz" | head -n 1)

if [ -z "$BUNDLE_FILE" ]; then
# Fall back to dev/deployment naming
BUNDLE_FILE=$(find /tmp -maxdepth 1 -name "proto-fleet-deployment*.tar.gz" | head -n 1)
fi

if [ -z "$BUNDLE_FILE" ]; then
# Last resort: any proto-fleet tarball
BUNDLE_FILE=$(find /tmp -maxdepth 1 -name "proto-fleet-*.tar.gz" | head -n 1)
fi

if [ -z "$BUNDLE_FILE" ]; then
echo "❌ Error: Could not find deployment bundle in /tmp"
echo "Contents of /tmp:"
ls -la /tmp
exit 1
fi

# Verify the bundle file size is reasonable (should be at least 1MB)
BUNDLE_SIZE=$(stat -c%s "$BUNDLE_FILE" 2>/dev/null || stat -f%z "$BUNDLE_FILE" 2>/dev/null || echo "0")
if [ "$BUNDLE_SIZE" -lt 1048576 ]; then
echo "❌ Error: Bundle file is too small ($BUNDLE_SIZE bytes), download may have failed"
echo "Bundle file: $BUNDLE_FILE"
ls -lh "$BUNDLE_FILE"
exit 1
fi

# Extract deployment bundle
echo "✅ Found deployment bundle: $BUNDLE_FILE ($(numfmt --to=iec-i --suffix=B $BUNDLE_SIZE 2>/dev/null || echo ${BUNDLE_SIZE} bytes))"
echo "Extracting to: $INSTALL_DIR"
tar -xzf "$BUNDLE_FILE" -C "$INSTALL_DIR"

# Restore .env file if it existed
if [ -f "/tmp/.env.backup" ]; then
echo "Restoring .env file..."
cp /tmp/.env.backup "$ENV_FILE"
rm /tmp/.env.backup
fi

# Clean up tarball
rm "$BUNDLE_FILE"

# Navigate to deployment directory
cd "$INSTALL_DIR/deployment"

# Make run-fleet.sh executable
chmod +x run-fleet.sh

# Run the deployment script
echo "Running deployment script..."
./run-fleet.sh

echo "Deployment complete!"

- name: Show deployment status
shell: bash
run: |
INSTALL_DIR="${{ inputs.install_dir }}"
if [ -z "$INSTALL_DIR" ]; then
INSTALL_DIR="$HOME/proto-fleet"
fi

cd "$INSTALL_DIR/deployment"

echo "Deployment complete!"
echo ""
echo "Deployment version:"
cat version.txt
echo ""
echo "Container status:"
docker compose ps
16 changes: 16 additions & 0 deletions .github/actions/go-cache-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Configure Go Cache
description: Setup Go build and module caching for workspace

runs:
using: "composite"
steps:
- name: Configure Go cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-${{ runner.arch }}-go-workspace-${{ hashFiles('**/go.sum', 'go.work') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-go-workspace-
${{ runner.os }}-${{ runner.arch }}-go-
25 changes: 25 additions & 0 deletions .github/actions/hermit-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Hermit Setup
description: Setup Hermit with caching
inputs:
preinstall:
description: 'If "true", pre-install all hermit packages.'
required: false
default: 'true'

runs:
using: "composite"
steps:
- name: Activate hermit
uses: cashapp/activate-hermit@12a728b03ad41eace0f9abaf98a035e7e8ea2318 # v1.1.4
with:
cache: "false" # Disable hermit cache to avoid it evicting yocto cache for now

- name: Install all hermit packages
if: ${{ inputs.preinstall == 'true'}}
shell: bash
run: |
if [[ ${RUNNER_OS} = 'Linux' && ${RUNNER_ARCH} == 'ARM64' ]]; then
echo "Skipping hermit install all for ${RUNNER_NAME} (${RUNNER_OS}:${RUNNER_ARCH})"
else
hermit install
fi
Loading
Loading