rollback.yml uses git checkout which does not work for symlink-based PHP deployments #5
Labels
No labels
Compat/Breaking
Compat/Deprecation
Kind
Bug
Kind
Chore
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Investigation
Kind
Question
Kind
Security
Kind
Testing
Meta/Good First Issue
Meta/Help Wanted
Meta/Stale
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Resolution
Confirmed
Resolution
Duplicate
Resolution
Invalid
Resolution
Won't Fix
Status
Abandoned
Status
Blocked
Status
Needs More Info
Status
Needs Triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
XeplosionGames/.forgejo#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened?
rollback.ymlrolls back by runninggit checkout HEAD~1on the server. This works for repos where the deployed files are a git working directory, but breaks for PHP repos using the symlink-based release strategy — the deployed code lives in a versionedreleases/directory, not a git repo, andcurrentis just a symlink pointing at it.Steps to reproduce
template-phprollback.ymleither manually or via a failed healthcheck/var/www/<site>/releases/is not a git repoExpected behavior
Rollback flips the
currentsymlink to the previous release directory and reloads php-fpm and nginx, matching the same atomic deploy strategy used byservice-start.sh.Environment
Any repo using
template-phpwith symlink-based deploymentAdditional context
Two possible solutions — either add a
scripts/rollback.shstub thatrollback.ymlcalls (consistent with the existing script delegation pattern), or add adeploy.strategyfield toxegames.config.yml(gitorsymlink) and haverollback.ymlbranch on that value. Thescripts/rollback.shapproach is preferred as it keeps workflow logic minimal and puts implementation detail in the script where it belongs. Bothrollback.ymlin.forgejoandtemplate-phpneed updating.Checklist