Skip to content

fix(release): stop rotating immutable per-version Docker dirs#792

Open
kojiromike wants to merge 2 commits into
openemr:masterfrom
kojiromike:fix-rotator-version-dir-immutable
Open

fix(release): stop rotating immutable per-version Docker dirs#792
kojiromike wants to merge 2 commits into
openemr:masterfrom
kojiromike:fix-rotator-version-dir-immutable

Conversation

@kojiromike

Copy link
Copy Markdown
Member

Summary

Slot rotation was mutating immutable per-version Docker build dirs and the dependabot config because tools/release/versions.yml listed them as rotating files. Rotating current 8.0.0→8.1 rewrote the old 8.0.0 dir's rel-800rel-810 pin and renamed the 8.0.0 dependabot entry to 8.1.0 — colliding with the entry the next slot 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/ builds rel-800 forever), exactly like the already-excluded 7.0.4 dir.

  • Remove the per-version Dockerfiles/READMEs and .github/dependabot.yml from files:.
  • Add whole-dir excludes: for docker/openemr/{8.0.0,8.1.0,8.1.1} (mirroring the existing 7.0.4 exclude) plus a dependabot.yml exclude.
  • SlotRotator.php is unchanged — the bug was the registry model, not the rotator.

After this change, every remaining files: entry is next-slotted; current/dev rotate via symlink + registry only.

Behavior

Before:

$ php tools/release/bin/rotate.php --repo "$PWD" --current=8.1 --dry-run
[dry-run] changed: docker/openemr/8.0.0/Dockerfile      ← BUG (immutable dir)
[dry-run] changed: .github/dependabot.yml               ← BUG (duplicate entry)
[dry-run] changed: docker/openemr/current
[dry-run] changed: tools/release/versions.yml

After:

[dry-run] changed: docker/openemr/current
[dry-run] changed: tools/release/versions.yml

Test plan

  • cd tools/release && composer test — 180 passed (incl. new testCurrentRotationLeavesVersionDirAndDependabotUntouched regression test)
  • composer phpstan && composer phpcs — green
  • php tools/release/bin/rotate.php --repo "$PWD" --current=8.1 --dry-run — reports only the symlink + registry
  • php tools/release/bin/lint-versions.php --repo "$PWD" — no new failures introduced

Follow-on to #777. Fixes the rotator behind the two unresolved threads on #760.

Copilot AI review requested due to automatic review settings June 10, 2026 20:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml from tools/release/versions.yml files: rotation targets.
  • Added excludes: entries for .github/dependabot.yml and 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 current rotation 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.

Comment thread tools/release/versions.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

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
@kojiromike kojiromike force-pushed the fix-rotator-version-dir-immutable branch from c3c5b52 to 8b9f84e Compare June 11, 2026 00:12
@kojiromike kojiromike requested a review from bradymiller June 11, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants