Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: coder/coder
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: coder/coder
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: callum/prebuild-fail-interval
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Dec 16, 2025

  1. feat(prebuilds): add incremental backoff for failed prebuild creation

    The prebuilds reconcile loop can currently spam workspace creation
    attempts that are always going to fail, such as when required dynamic
    parameters are missing or unresolved.
    
    This change introduces an in-memory per-preset backoff mechanism that
    tracks consecutive creation failures and delays subsequent creation
    attempts using linear backoff:
    
    - First failure: backoff for 1x interval (default 1 minute)
    - Second consecutive failure: backoff for 2x interval (2 minutes)
    - Third consecutive failure: backoff for 3x interval (3 minutes)
    - And so on...
    
    When a creation succeeds, the failure tracking is cleared and any
    subsequent failure starts backoff from 1x interval again.
    
    This complements the existing database-based backoff system by
    preventing immediate retry spam when creation fails quickly (e.g.,
    due to missing parameters), while still allowing periodic retries
    and recovery when issues are fixed.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
    Callum Styan and claude committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    1a57963 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2025

  1. refactor: extract failure tracking to presetFailuresTracker struct

    Encapsulates the failure tracking logic into a dedicated
    presetFailuresTracker struct with its own methods, improving code
    organization and separation of concerns.
    
    Changes:
    - Created presetFailuresTracker struct with failures map and mutex
    - Moved RecordFailure, RecordSuccess, and ShouldBackoff methods to
      the tracker
    - Updated StoreReconciler to hold a failureTracker instance
    - Updated all call sites to use the new tracker methods
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
    Callum Styan and claude committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    fb63db7 View commit details
    Browse the repository at this point in the history
Loading