Skip to content

Build-Switches: document DOCKER_PRUNE opt-in#920

Merged
igorpecovnik merged 1 commit intomainfrom
docs-docker-prune
May 5, 2026
Merged

Build-Switches: document DOCKER_PRUNE opt-in#920
igorpecovnik merged 1 commit intomainfrom
docs-docker-prune

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik igorpecovnik commented May 5, 2026

Summary

armbian/build PR #9704 gates the Docker image cleanup behind DOCKER_PRUNE=yes (default off) to avoid a race on hosts where multiple build invocations share one Docker daemon. This PR documents the new switch in Developer-Guide_Build-Switches.md next to the existing DOCKER_* entries, with a behaviour-change note for users who relied on the previous automatic reclaim.

Requested by @tabrisnet during review of armbian/build#9704.

Test plan

  • Render the docs locally and confirm the new section renders correctly between ARMBIAN_DOCKER_AUTO_PULL and CI.

Create docs preview on PR

Documentation website preview will be available shortly:


 Open WWW preview 

armbian/build now gates Docker image cleanup behind DOCKER_PRUNE=yes
(defaulting to off) to avoid a race on hosts where multiple build
invocations share one Docker daemon — the typical setup on a server
running several self-hosted GitHub Actions runners. Add the switch
to the Build-Switches reference next to the other DOCKER_* entries,
including a behaviour-change note for users who relied on the
automatic reclaim.

See: armbian/build#9704
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Walkthrough

Documentation was added to docs/Developer-Guide_Build-Switches.md to describe a new optional DOCKER_PRUNE build switch. The switch controls whether Armbian build images are pruned from the local Docker daemon at the start of each build. The documentation notes that the default behavior changed: pruning now requires explicitly setting DOCKER_PRUNE=yes, whereas previously cleanup ran unconditionally.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: documenting a new DOCKER_PRUNE build switch with opt-in behavior, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly describes the changeset, explaining the new DOCKER_PRUNE switch documentation, its purpose (gating cleanup behind an opt-in flag), and the context from the upstream PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-docker-prune

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size/small PR with less then 50 lines Needs review Seeking for review and removed size/small PR with less then 50 lines labels May 5, 2026
github-actions Bot pushed a commit that referenced this pull request May 5, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/Developer-Guide_Build-Switches.md (1)

145-147: ⚡ Quick win

Consider breaking up the long explanation for better readability.

Lines 145-147 form a single 200+ character sentence that packs in multiple complex ideas: what the option does, the default rationale, the race condition scenario, the error message, and the use-case recommendation. Breaking this into shorter sentences would improve comprehension.

📝 Suggested rewrite for improved clarity
-Whether the build framework automatically reclaims disk space by removing old Armbian build images during setup. Off by default — safe for hosts where multiple build invocations share one Docker daemon (typical for a server running several self-hosted GitHub Actions runners on the same machine), since concurrent pruning can race with another invocation that is still committing a freshly built image and surface as `failed to get digest sha256:…: no such file or directory`, aborting the in-flight build.
-
-Set to `yes` on single-host setups where automatic disk reclaim is desirable.
+Controls whether the build framework automatically reclaims disk space by removing old Armbian build images during setup.
+
+The default is `no` to avoid race conditions on hosts where multiple build invocations share one Docker daemon (typical for a server running several self-hosted GitHub Actions runners). Concurrent pruning can race with another invocation that is still committing a freshly built image, causing errors like `failed to get digest sha256:…: no such file or directory` and aborting the in-flight build.
+
+Set to `yes` on single-host setups where automatic disk reclaim is desirable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/Developer-Guide_Build-Switches.md` around lines 145 - 147, Split the
long paragraph explaining automatic disk reclamation into several short
sentences: first state plainly what the option controls (automatic removal of
old Armbian build images), then state the default setting (off) and the
rationale (safe for hosts where multiple build invocations share one Docker
daemon), next describe the race condition scenario and include the example error
(`failed to get digest sha256:…: no such file or directory`) as a separate short
sentence, and finish with the recommendation for single-host setups (set to
`yes` when automatic reclaim is desirable); target the paragraph that begins
“Whether the build framework automatically reclaims disk space by removing old
Armbian build images during setup...” for this rewrite.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/Developer-Guide_Build-Switches.md`:
- Around line 145-147: Split the long paragraph explaining automatic disk
reclamation into several short sentences: first state plainly what the option
controls (automatic removal of old Armbian build images), then state the default
setting (off) and the rationale (safe for hosts where multiple build invocations
share one Docker daemon), next describe the race condition scenario and include
the example error (`failed to get digest sha256:…: no such file or directory`)
as a separate short sentence, and finish with the recommendation for single-host
setups (set to `yes` when automatic reclaim is desirable); target the paragraph
that begins “Whether the build framework automatically reclaims disk space by
removing old Armbian build images during setup...” for this rewrite.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 553ec111-ac54-4c45-9312-b8de399b7613

📥 Commits

Reviewing files that changed from the base of the PR and between 6fa4e0e and 0856b8e.

📒 Files selected for processing (1)
  • docs/Developer-Guide_Build-Switches.md

Copy link
Copy Markdown
Collaborator

@tabrisnet tabrisnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igorpecovnik igorpecovnik merged commit 4690006 into main May 5, 2026
5 checks passed
@igorpecovnik igorpecovnik deleted the docs-docker-prune branch May 5, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs review Seeking for review

Development

Successfully merging this pull request may close these issues.

2 participants