2.0.8.1 bug: Package directory NOT purged (again)!!!!!

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

2.0.8.1 bug: Package directory NOT purged (again)!!!!!

Postby mwoffenden » Wed Jul 10, 2013 5:52 pm

Just ran a deploy.

Set the RedGatePurgePackageDirectoryBeforeCopy = true.

Just as in previous releases, some of the directory files got purged, some got left behind, even though the log reports no errors. I did the deploy today and yet some of the folders have a create/modify date of 7/7/13, indicating they did not get purged. I also watched the deploy on the server and noted that some folders did not get deleted.

How about checking the folder to make sure it's been cleared before proceeding? Or how about throwing an error if there are permission issues?

I've reported this more than once and am shocked that it's not yet been fixed. How can anyone depend on a product that does just half the job?
mwoffenden
 
Posts: 72
Joined: Sat Jun 08, 2013 10:41 pm
Location: Boston

Postby Mike Upton » Thu Jul 11, 2013 9:56 am

Hi,

I've just had a look at the purge directory code in detail to check exactly what happens when the RedGatePurgePackageDirectoryBeforeCopy variable is set to true:

  • If the target directory specified by RedGatePackageDirectoryPath does not exist, it exits immediately
  • If the directory does exist, it then enumerates all the files within the RedGatePackageDirectoryPath folder (and recursively through sub-folders)
  • For each file, 3 attempts are made to delete the file. If any file cannot be deleted after 3 attempts, an error is thrown and the deployment fails.

We don't currently delete the folders, only files within the folders. Are you seeing files left behind after the delete? Is it important to you that the empty folders are deleted?
Mike Upton

Software Engineer
Red Gate Software Ltd.
Mike Upton
 
Posts: 157
Joined: Wed May 11, 2011 8:04 am
Location: Red Gate

Re:

Postby mwoffenden » Thu Jul 11, 2013 10:40 am

Thanks for the information, however, I've never been able to get the purge to work. And it does not throw an error.

If I can't get a fix for this, I'll have to manually purge the folder, which obviously defeats the purpose of using Deployment Manager.
mwoffenden
 
Posts: 72
Joined: Sat Jun 08, 2013 10:41 pm
Location: Boston

Postby Mike Upton » Thu Jul 11, 2013 10:54 am

Would you be able to post a copy of your deployment log when the purge operation fails? If you're not happy to post it on a public forum, you could PM me, or e-mail support@red-gate.com (if you do e-mail the log, could you put 'FAO: Michael Upton' in the subject line so it gets to me quickly).
Mike Upton

Software Engineer
Red Gate Software Ltd.
Mike Upton
 
Posts: 157
Joined: Wed May 11, 2011 8:04 am
Location: Red Gate

Re:

Postby mwoffenden » Thu Jul 11, 2013 3:02 pm

Mike Upton wrote:Are you seeing files left behind after the delete? Is it important to you that the empty folders are deleted?

I did not see any files left behind, but folders and symbolic links were left behind. And yes, this is important, the use case being that I want to be sure that the folder is 100% clean before publishing. I suspect that most users would want the same behavior.

Indeed, your own documentation defines RedGatePurgePackageDirectoryBeforeCopy as follows:

"If you're using RedGatePackageDirectoryPath, set this variable to True to clean the target directory before copying."

I think that most people would agree that "clean the target directory" means that the clean operation should remove everything from the folder.
mwoffenden
 
Posts: 72
Joined: Sat Jun 08, 2013 10:41 pm
Location: Boston

Postby david.conlin » Tue Jul 16, 2013 3:55 pm

I've just changed this functionality to delete folders (and symbolic links to folders) for you.

Unfortunately, it didn't quite make today's release, although we're hoping it'll make it out as part of a bunch of small tweaks before the end of the week.
David Conlin
Software Developer
Deployment Manager
david.conlin
 
Posts: 50
Joined: Fri May 04, 2012 3:44 pm

Re:

Postby mwoffenden » Tue Jul 16, 2013 3:59 pm

david.conlin wrote:I've just changed this functionality to delete folders (and symbolic links to folders)
Great!
Michael Woffenden
Founder and President
Information Results Corporation
mwoffenden
 
Posts: 72
Joined: Sat Jun 08, 2013 10:41 pm
Location: Boston

Postby david.conlin » Mon Jul 22, 2013 10:33 am

The release today (2.1.4) deletes folders as part of a directory purge
David Conlin
Software Developer
Deployment Manager
david.conlin
 
Posts: 50
Joined: Fri May 04, 2012 3:44 pm


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests