Update process for extensions

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Update process for extensions

Post by EXreaction » Mon Mar 04, 2013 3:13 am

We should probably have some sort of guidelines for the safest way to update an extension.

I believe this is going to be:
  1. Disable previous version of extension
  2. Delete old extension files
  3. Upload new extension files
  4. Disable the board
  5. Enable the extension (If board enabled, automatically disable, then re-enable when complete)
  6. Enable the board
Does this sound correct to everyone or might some opportunity for errors exist?

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Update process for extensions

Post by MichaelC » Mon Mar 04, 2013 8:07 am

Disable Previous Version
Delete old files (as otherwise, files that were just removed will still be included due to autoloading)
Upload new files
Re-enable extension

Then any migrations that have not already been executed will be (so updating the db) and the files are done cleanly as its just deleting and uploading.
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 131
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: Update process for extensions

Post by Marc » Mon Mar 04, 2013 10:01 am

MichaelC wrote:Disable Previous Version
Delete old files (as otherwise, files that were just removed will still be included due to autoloading)
Upload new files
Re-enable extension

Then any migrations that have not already been executed will be (so updating the db) and the files are done cleanly as its just deleting and uploading.
This +1

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Update process for extensions

Post by callumacrae » Mon Mar 04, 2013 6:10 pm

MichaelC wrote:Disable Previous Version
Delete old files (as otherwise, files that were just removed will still be included due to autoloading)
Upload new files
Re-enable extension

Then any migrations that have not already been executed will be (so updating the db) and the files are done cleanly as its just deleting and uploading.
What about extensions which include a large number of images or large files? If the only changes have been in PHP files, users shouldn't have to disable a chunk of their site while they upload the same files they just deleted.
Made by developers, for developers!
My blog

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Update process for extensions

Post by imkingdavid » Mon Mar 04, 2013 6:27 pm

I am mostly in agreement with MichaelC's proposal, but I am assuming, when we integrate the extensions admin with composer, that it will have a one click update process?
callumacrae wrote:What about extensions which include a large number of images or large files? If the only changes have been in PHP files, users shouldn't have to disable a chunk of their site while they upload the same files they just deleted.
Extensions could provide update packages that only include the changed/new files. This would not, however, handle deleting files that are no longer in use following the update.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: Update process for extensions

Post by Oleg » Tue Mar 05, 2013 12:56 am

The entire site must be disabled for the disabling to make sense.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Update process for extensions

Post by EXreaction » Tue Mar 05, 2013 1:34 am

Why do you say that?

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Update process for extensions

Post by imkingdavid » Tue Mar 05, 2013 2:21 am

EXreaction wrote:Why do you say that?
Any schema changes can lock up the affected tables resulting in data corruption and/or loss. I found this out the hard way when I failed to disable the board before installing a mod for a client, which resulted in losing entire topics.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: Update process for extensions

Post by Pony99CA » Tue Mar 05, 2013 2:25 am

imkingdavid wrote:
EXreaction wrote:Why do you say that?
Any schema changes can lock up the affected tables resulting in data corruption and/or loss. I found this out the hard way when I failed to disable the board before installing a mod for a client, which resulted in losing entire topics.
Ouch! If that's the case, maybe the Extension installer (composer?) should autmoatically disable the board (with a warning, of course, to let the admin know what will happen).

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Update process for extensions

Post by EXreaction » Tue Mar 05, 2013 3:29 pm

Automatically disabling and re-enabling the board sounds like a good idea to me if we had some sort of automatic update process, but we don't currently, so we don't know when someone is disabling an extension to disable it or to update it.

I updated the first post with the new guidelines of what has been said so far.

Post Reply