fix(release): stop rotating immutable per-version Docker dirs#792
Open
kojiromike wants to merge 2 commits into
Open
fix(release): stop rotating immutable per-version Docker dirs#792kojiromike wants to merge 2 commits into
kojiromike wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the release rotation registry model so slot rotation no longer mutates immutable, per-version Docker build directories (and the repository’s Dependabot configuration). It aligns rotation behavior with the symlink-based slot resolution introduced in #777, ensuring only symlinks + the registry change during current/dev rotations.
Changes:
- Removed per-version Dockerfiles/READMEs and
.github/dependabot.ymlfromtools/release/versions.ymlfiles:rotation targets. - Added
excludes:entries for.github/dependabot.ymland the entire per-version Docker build directories (docker/openemr/8.0.0,8.1.0,8.1.1). - Updated/added SlotRotator tests to assert per-version dirs and Dependabot are not modified, plus a regression test covering the
currentrotation case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/release/versions.yml | Stops rotating immutable per-version Docker dirs and Dependabot by moving them out of files: and into whole-path excludes:. |
| tools/release/tests/SlotRotatorTest.php | Adjusts expectations to only rotate external next-slotted files + symlinks/registry; adds regression coverage for “current rotation leaves version dir + dependabot untouched”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Slot rotation was rewriting per-version build artifacts because the registry listed them as rotating files. Rotating current 8.0.0→8.1 rewrote the old 8.0.0 dir's rel-800→rel-810 pin and renamed the 8.0.0 dependabot entry to 8.1.0, colliding with the entry the next slot already owns. Version dirs are immutable historical artifacts (8.0.0/ builds rel-800 forever), exactly like the already-excluded 7.0.4 dir. This completes the openemr#777 migration to symlink-based slot resolution: remove the per-version Dockerfiles/READMEs and dependabot.yml from files:, and add whole-dir excludes for docker/openemr/{8.0.0,8.1.0,8.1.1} plus dependabot.yml. SlotRotator.php is unchanged — the bug was the registry model, not the rotator. Rotation now flips only the slot symlink + registry; no per-version dir or the dependabot config is ever edited. Assisted-by: Claude Code
The 8.0.0 dir's compose example referenced openemr/openemr:7.0.5 (a copy-paste predating the 8.0.0 tag). Now that per-version dirs are excluded from rotation, this stale tag can no longer be auto-corrected, so fix it to match the dir (matching the 8.1.0/8.1.1/7.0.4 convention). Assisted-by: Claude Code
c3c5b52 to
8b9f84e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slot rotation was mutating immutable per-version Docker build dirs and the dependabot config because
tools/release/versions.ymllisted them as rotating files. Rotatingcurrent8.0.0→8.1 rewrote the old8.0.0dir'srel-800→rel-810pin and renamed the8.0.0dependabot entry to8.1.0— colliding with the entry thenextslot already owns. This is the root cause behind both unresolved review threads on #760.This completes the #777 migration to symlink-based slot resolution. Version dirs are immutable historical artifacts (
8.0.0/buildsrel-800forever), exactly like the already-excluded7.0.4dir..github/dependabot.ymlfromfiles:.excludes:fordocker/openemr/{8.0.0,8.1.0,8.1.1}(mirroring the existing 7.0.4 exclude) plus adependabot.ymlexclude.SlotRotator.phpis unchanged — the bug was the registry model, not the rotator.After this change, every remaining
files:entry isnext-slotted;current/devrotate via symlink + registry only.Behavior
Before:
After:
Test plan
cd tools/release && composer test— 180 passed (incl. newtestCurrentRotationLeavesVersionDirAndDependabotUntouchedregression test)composer phpstan && composer phpcs— greenphp tools/release/bin/rotate.php --repo "$PWD" --current=8.1 --dry-run— reports only the symlink + registryphp tools/release/bin/lint-versions.php --repo "$PWD"— no new failures introducedFollow-on to #777. Fixes the rotator behind the two unresolved threads on #760.