Skip to content

Upgrade path: rigforge.sh upgrade, idempotent re-runs, and prune old build archives #4

Closed

Description

@VijitSingh97

Problem

There's no upgrade story and re-running is wasteful/leaky:

  • Every run re-clones + recompiles XMRig from scratch (minutes), even when nothing changed.
  • prepare_workspace moves xmrig → xmrig-<timestamp> on every run and never cleans up (rigforge.sh:159-162) — archives accumulate forever (observed 8+ stale xmrig-* dirs on a test box). A disk leak.

Proposed

  • An upgrade flow that re-pulls the pinned XMRIG_VERSION, rebuilds, and restarts the service only if the version changed; skip recompile when the pinned version is already built (idempotent re-runs).
  • Prune old build archives (keep last N, or remove on successful build).
  • A self-update note/command for the RigForge repo itself (git pull + re-run).

Acceptance

  • Re-running with no version change is a fast no-op (no needless recompile).
  • Old xmrig-* archives are pruned; disk doesn't grow unbounded.
  • upgrade rebuilds + restarts only on a version bump.

Activity

  1. added this to the v1.0 milestone on Jun 3, 2026
  2. added
    enhancementNew feature or request
    setupConfiguration and first-run setup
    infraDeployment, packaging, releases
    on Jun 3, 2026
  3. VijitSingh97 commented on Jun 6, 2026

    @VijitSingh97
    ContributorAuthor

    Not implemented here, but #26 (closes #5) adds test coverage for re-run idempotency that this work will build on:

    • The Docker E2E runs the full deploy twice and asserts the system-state edits don't duplicate (fstab / limits / GRUB single-entry + "already configured"), config.json is byte-stable across runs, and the workspace is archived.
    • That archiving assertion also confirms the behaviour this issue calls out: each run adds one xmrig-<timestamp> dir and never prunes — a disk leak.

    When the upgrade / fast-no-op + archive-pruning work lands, tests/run.sh and tests/e2e/ are the place to update the idempotency assertions.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfraDeployment, packaging, releasessetupConfiguration and first-run setup

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions