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

mwoffendenmwoffenden Posts: 98
edited July 22, 2013 5:33AM in Deployment Manager
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?
Michael Woffenden
Founder and President
Information Results Corporation

Comments

  • 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?
    Development Lead
    Redgate Software
  • 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.
    Michael Woffenden
    Founder and President
    Information Results Corporation
  • 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).
    Development Lead
    Redgate Software
  • 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.
    Michael Woffenden
    Founder and President
    Information Results Corporation
  • 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
  • I've just changed this functionality to delete folders (and symbolic links to folders)
    Great!
    Michael Woffenden
    Founder and President
    Information Results Corporation
  • The release today (2.1.4) deletes folders as part of a directory purge
    David Conlin
    Software Developer
    Deployment Manager
Sign In or Register to comment.