feat(docker): expose memory (RAM) limit as an Advanced View field (OS-467)#2673
feat(docker): expose memory (RAM) limit as an Advanced View field (OS-467)#2673elibosley wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 53 minutes and 42 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
…(OS-469) (#2674) ## Summary Implements [OS-469](https://linear.app/lime-technology/issue/OS-469/pr-test-plugin-ship-a-diffpatch-so-multiple-pr-plugins-can-stack-on). The per-PR test plugin used to package changed files as **whole-file copies**, overwrite them on install, and **abort** if another `webgui-pr-*` plugin already managed any of the same files — so two PRs touching one file (e.g. [#2672](#2672) + [#2673](#2673), both editing `CreateDocker.php`) couldn't be tested together. Now it ships a **unified diff** and `patch`-applies it, so non-overlapping edits to the same file stack. ## How it works - **Build** (`pr-plugin-build.yml`): for changed **text** files, stage base + head versions in system layout and emit `pr.patch` (`diff -ruN`, paths apply with `patch -p1` at `/`). Changed **binary** files are copied whole into `binary/` with a `binary_files.txt` list. Both go in the same tarball. - **Plugin** (`generate-pr-plugin.sh`): on install, `patch -p1 --dry-run --forward` first — **abort with a clear message on a real reject** (overlapping change), otherwise apply and save `applied.patch`. Binaries are whole-file replaced with a per-binary conflict guard. On remove (and before update), reverse the patch (`patch -R`) and restore binary backups. - **Upload/R2 plumbing unchanged** — still a single tarball with the same URL/SHA wiring. ## Validation (local simulation) - Two patches editing the same file at different lines → **both apply, both changes coexist**. - Reversing one → **only that change is removed, the other stays**. - Overlapping edits → **dry-run fails → install aborts** cleanly. - Generated `.plg` is well-formed XML (all placeholders substituted); `bash -n` + YAML parse clean. ## Notes / still to verify - Real validation needs CI + an Unraid box installing two stacked PR plugins. Conveniently, **this PR touches `.github/**`, so it will itself build a PR test plugin with the new code** — a live smoke test of the generator. - Binary deletions aren't handled (rare); text add/modify/delete are. - `patch` is present in the Unraid base; uses `--forward`/`--batch` for non-interactive apply with fuzz. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Improved plugin install/update and uninstall to use a deterministic, patch-based manifest workflow for safer reversibility. * Enhanced plugin package generation to build a patch-oriented payload, distinguishing text changes from full binary replacements. * Updated the uninstall confirmation flow to reflect the new removal behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Add a "Memory limit" field to the Docker Add/Edit form (Advanced View) that maps to docker --memory, instead of requiring users to hand-write it in Extra Parameters. Empty leaves the container unlimited (unchanged default). The value round-trips through the container XML template (<Memory>) and is emitted as --memory=<value> in the docker create command. Closes OS-467 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d441925 to
4d18192
Compare
…rop shared-file edits - Save mode is now much faster: pipe the single-pass streaming zip (scripts/flash_backup) into the destination file instead of appending each top-level item to a growing archive (one zip invocation vs many). - On completion the save job raises an Unraid notification (the tray bell) with a click-to-download link, exposes the saved file for download via a docroot symlink, and the GUI shows a Download button next to the saved path. - Revert the helptext.txt and .gitignore edits to base so this PR touches only its own files. helptext.txt was the single file shared with other in-flight PR test plugins (#2671, #2673), which made the stacked PR-plugin patch fail to apply; with it gone, #2677 stacks cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Implements OS-467 — exposes the existing
docker --memorycapability as a first-class Memory limit field in Advanced View, instead of requiring users to hand-write it in Extra Parameters.Changes
include/CreateDocker.php— newcontMemorytext field in the Advanced View block (after Extra Parameters), with placeholder/pattern/help.include/Helpers.php:postToXML()→$xml->Memory = xml_encode(trim($post['contMemory']??'')).xmlToCommand()→$cmdMemory = strlen($xml['Memory']??'') ? '--memory='.escapeshellarg($xml['Memory']) : ''and added$cmdMemoryto thedocker createsprintf (right after--cpuset-cpus). Verified placeholder/arg parity (41 = 41).languages/en_US/helptext.txt—:docker_memory_limit_help:.Behavior
--memoryflag (unchanged default).b/k/m/gsuffix (e.g.512m,2g); validated client-side viapattern.cont+key convention (Settings['Memory']→contMemory).--memoryis also present in Extra Parameters, Docker honors the later flag; documented in the help text.Notes
php -lclean on both PHP files.Testing to do on hardware
512m, create/edit a container, confirmdocker inspectshows the memory limit and the value round-trips on re-edit.🤖 Generated with Claude Code