- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.6k
fix: clear opcache after app extraction #53210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
clear opcache post app update extraction to prevent outdated files issues. opcache.validate_timestamps=0 disables automated file modification checks. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
| My system has  Before this patch: 
 After this patch (and manually invalidating  
 I should have taken a files which did actually change between these versions, but it shows the cache reset works as intended, and indeed the previous behavior caused unnecessary problems with  EDIT: That scripts always show has been invalidated with  | 
| 
 I think it does not solve the problem, as the app and therefore some event listeners, services, etc might be loaded already with old data. That does not refresh with opcache clear…? | 
| But any page load/navigation would re-initiate those, isn't it? I mean sure any detached background jobs like a running image preview generation or such could theoretically finish, but how many apps implement such which takes significant time to survive throughout an app update? If so, a real solution would be probably a hook or such for apps to terminate anything they run, before doing the update. If I remember right, apps are already disabled temporarily on update, isn't it? In any case, such is not related to OPcache, so OPcache related issues when updating apps via web UI are solved with this, which is an enhancement. | 
| The big issue is that the update/upgrade process itself is still broken and migrations still can not reference new code… | 
| Well, "boken" sounds a bit harsh, I mean I rarely face any issues with app updates, despite  | 
| 
 
 | 
| Hmm, maybe CLI should write a flag into database while running, so updates/upgrades can check and wait for it to disappear, before doing any file changes. Similarly, updates/upgrades could deploy a flag which prevents CLI from running. Maintenance mode in  However, I am voting for not letting this discussion delay this PR to be merged. It is enhancement in its own, even if it does not solve all possible issues. | 
| I think it makes sense. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would place it one line above to call it even early, but fine be me 😆
| /backport to stable31 | 
| /backport to stable30 | 
| The backport to  # Switch to the target branch and update it
git checkout stable31
git pull origin stable31
# Create the new backport branch
git checkout -b backport/53210/stable31
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c7b69931
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/53210/stable31Error: Failed to check for changes with origin/stable31: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. | 
| The backport to  # Switch to the target branch and update it
git checkout stable30
git pull origin stable30
# Create the new backport branch
git checkout -b backport/53210/stable30
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c7b69931
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/53210/stable30Error: Failed to check for changes with origin/stable30: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. | 
| /backport to stable31 | 
| The backport to  # Switch to the target branch and update it
git checkout stable31
git pull origin stable31
# Create the new backport branch
git checkout -b backport/53210/stable31
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c7b69931
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/53210/stable31Error: Failed to check for changes with origin/stable31: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. | 
| Hmm, somehow this backportbot diff test gives wrong result 🤔: nextcloud/backportbot@b3b62e4#diff-b7dac73310d09b8ffa7d22f401022ef1a9ade956e7bdf1a196aca871cc669785R45 | 
| /backport to stable31 | 
| The backport to  # Switch to the target branch and update it
git checkout stable31
git pull origin stable31
# Create the new backport branch
git checkout -b backport/53210/stable31
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c7b69931
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/53210/stable31Error: Failed to check for changes with origin/stable31: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. | 




Summary
Note
Since I usually do not update apps from the app store on my development system, I have not tested this yet. If you believe this change makes sense, I will try to find some time to test it. Triggering such an error requires a bit of luck.
clear opcache post app update extraction to prevent outdated files issues.
opcache.validate_timestamps=0 disables automated file modification checks.
TODO
Checklist