Skip to content

v0.0.16 - Parallelization Support

Choose a tag to compare

@cfurrow cfurrow released this 01 Dec 19:54
· 10 commits to main since this release
26ed917

πŸš€ Major Performance Enhancement: Parallelization Support

This release adds parallelization capabilities to fix the recurring 30-minute timeout issue in large repositories.

⚑ Performance Impact

Before (Single Job):

  • ❌ 30+ minutes β†’ Timeout failure
  • Fetches ALL branches sequentially
  • Single monolithic job

After (Parallelized):

  • βœ… 5-6 minutes β†’ Success
  • Fetches only needed branches per job
  • Multiple parallel workers
  • 5-6x faster execution

🎯 What's New

New Features

  • Branch Discovery Script (discover-branches): Fast branch listing via git ls-remote with batching
  • Batch Mode: Process specific branch lists instead of all branches
  • Parallelized Workflow Pattern: Two-stage architecture (discovery β†’ parallel processing)
  • Discovery Action: Available at betterup/delete-old-branches-action/discovery@v0.0.16

New Input Parameters

  • branch_list: Space-separated list of branches to process (enables batch mode)
  • batch_size: Number of branches per batch (discovery action)

Docker Image Updates

  • Added jq for JSON processing
  • Includes new discover-branches script

πŸ“š Documentation

  • README.md: Added comprehensive parallelization guide
  • MIGRATION.md: Step-by-step migration instructions
  • Example Workflow: .github/workflows/parallel-delete-example.yml

πŸ”„ Backward Compatibility

βœ… Fully backward compatible - All existing workflows continue to work unchanged. Parallelization is opt-in via the new workflow pattern.

πŸ“– Quick Start

For repositories experiencing timeouts, see the parallelization guide in the README or follow the migration guide.

Example parallelized workflow:

jobs:
  # Stage 1: Discover branches and create batches
  discover:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.discover.outputs.matrix }}
    steps:
      - name: Discover branches
        id: discover
        uses: betterup/delete-old-branches-action/discovery@v0.0.16
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          batch_size: "100"

  # Stage 2: Process branches in parallel
  process:
    needs: discover
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 10
      matrix: ${{ fromJson(needs.discover.outputs.matrix) }}
    steps:
      - uses: actions/checkout@v4
      - uses: betterup/delete-old-branches-action@v0.0.16
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          date: "60 days ago"
          branch_list: ${{ matrix.branches }}

πŸ“¦ Commits

  • feat: add branch discovery script for parallelization
  • feat: add batch mode support to delete-old-branches
  • build: add jq and discover-branches to Docker image
  • feat: add branch_list input parameter for batch processing
  • docs: add example parallelized workflow
  • docs: add parallelization guide and migration documentation
  • fix: correct action usage in documentation
  • fix: output compact single-line JSON for GitHub Actions

πŸ”§ Bug Fixes in v0.0.16

  • Fixed incorrect Docker image references in documentation
  • Moved discovery action to subdirectory structure (discovery/action.yml)
  • Corrected input parameter names in examples
  • Fixed multi-line JSON output causing GitHub Actions parsing errors

πŸ™ Acknowledgments

Built to solve timeout issues in large monorepos with 1000+ branches.

Full Changelog: v0.0.15...v0.0.16