From adambyrtek at gmail.com Tue Aug 11 17:24:42 2009 From: adambyrtek at gmail.com (Adam Byrtek) Date: Tue, 11 Aug 2009 23:24:42 +0200 Subject: [Cruisecontrolrb-users] Problems with do_clean_checkout Message-ID: <670d23ff0908111424m479334f4w399abf3791ce03e0@mail.gmail.com> Recently I started to experiment with do_clean_checkout (with Subversion adapter) in order to make sure there are no interactions between different builds. Unfortunately this feature breaks in 1.4.0 (I haven't tried HEAD yet) with an error message "Repository location is not specified". I took a quick a look at the code and looks like the problem is caused by the fact that the SourceControl adapter is initialized based only on the path to the "work" directory. It means that it doesn't contain the :repository option required to do a proper checkout, which leads to the error quoted above. I'll appreciate any feedback from others that encountered the same issue or use do_clean_checkout without any problems. If this is really a bug I can volunteer to work on a patch. In fact I'm surprised that this feature has actually worked for somebody. Best regards, Adam -- Adam Byrtek From adambyrtek at gmail.com Wed Aug 12 06:28:23 2009 From: adambyrtek at gmail.com (Adam Byrtek) Date: Wed, 12 Aug 2009 12:28:23 +0200 Subject: [Cruisecontrolrb-users] Problems with do_clean_checkout In-Reply-To: <648eacf20908111506k522174d0udff2751ed4503d85@mail.gmail.com> References: <670d23ff0908111424m479334f4w399abf3791ce03e0@mail.gmail.com> <648eacf20908111506k522174d0udff2751ed4503d85@mail.gmail.com> Message-ID: <670d23ff0908120328g2c058ed6w16002bbb803795f1@mail.gmail.com> On Wed, Aug 12, 2009 at 00:06, Jeremy Lightsmith wrote: > I think the idea is that, if you actually want to use this feature, you need > to do additional initialization in your cruise_config.rb file.? I don't have > it in front of me, but it would be something like : > > Project.config do |project| > ? project.source_control = Subversion.new(:repository => > "svn://my.repos...", :user ...) > end I didn't want to overwrite source_control if it exists so I tried this project.source_control.repository = "https://..." and it works, thanks. Fortunately the user credentials are cached by the Subversion client. > if all we ever do is svn updates, we don't need this info, and while you do > enter it in order to create your project in the first place, cruise doesn't > store it. I understand that. Looks like all the options that are provided on the command line are lost after the initial checkout is done. Even the type of the source control system is auto-detected based on contents of the work directory. On the other hand do_clean_checkout is described in the documentation without any additional comments and when you use it as documented the effect is as follows 1. The work directory is purged completely. 2. The web interface fails with 500, you cannot even access the main page. In other words the application is in inconsistent state and the situation has to be resolved manually. My proposition to solve this issue would be 1. Get the repository URL from "svn info" (or equivalents in other SCMs) before the work directory is purged. This file is already parsed to get some other information so this should be quite easy. 2. Fail gracefully when the work directory doesn't exist. 3. Document it better. If there are no objections I can start with preparing a patch for 1. Best regards, Adam -- Adam Byrtek From jeremy.lightsmith at gmail.com Wed Aug 12 12:50:01 2009 From: jeremy.lightsmith at gmail.com (Jeremy Lightsmith) Date: Wed, 12 Aug 2009 09:50:01 -0700 Subject: [Cruisecontrolrb-users] Problems with do_clean_checkout In-Reply-To: <670d23ff0908120328g2c058ed6w16002bbb803795f1@mail.gmail.com> References: <670d23ff0908111424m479334f4w399abf3791ce03e0@mail.gmail.com> <648eacf20908111506k522174d0udff2751ed4503d85@mail.gmail.com> <670d23ff0908120328g2c058ed6w16002bbb803795f1@mail.gmail.com> Message-ID: Sounds like a great patch candidate On Aug 12, 2009, at 3:28 AM, Adam Byrtek wrote: > On Wed, Aug 12, 2009 at 00:06, Jeremy > Lightsmith wrote: >> I think the idea is that, if you actually want to use this feature, >> you need >> to do additional initialization in your cruise_config.rb file. I >> don't have >> it in front of me, but it would be something like : >> >> Project.config do |project| >> project.source_control = Subversion.new(:repository => >> "svn://my.repos...", :user ...) >> end > > I didn't want to overwrite source_control if it exists so I tried this > > project.source_control.repository = "https://..." > > and it works, thanks. Fortunately the user credentials are cached by > the Subversion client. > >> if all we ever do is svn updates, we don't need this info, and >> while you do >> enter it in order to create your project in the first place, cruise >> doesn't >> store it. > > I understand that. Looks like all the options that are provided on the > command line are lost after the initial checkout is done. Even the > type of the source control system is auto-detected based on contents > of the work directory. > > On the other hand do_clean_checkout is described in the documentation > without any additional comments and when you use it as documented the > effect is as follows > > 1. The work directory is purged completely. > 2. The web interface fails with 500, you cannot even access the main > page. > > In other words the application is in inconsistent state and the > situation has to be resolved manually. > > My proposition to solve this issue would be > > 1. Get the repository URL from "svn info" (or equivalents in other > SCMs) before the work directory is purged. This file is already parsed > to get some other information so this should be quite easy. > 2. Fail gracefully when the work directory doesn't exist. > 3. Document it better. > > If there are no objections I can start with preparing a patch for 1. > > Best regards, > Adam > > > -- > Adam Byrtek > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users From adambyrtek at gmail.com Fri Aug 14 18:43:32 2009 From: adambyrtek at gmail.com (Adam Byrtek) Date: Sat, 15 Aug 2009 00:43:32 +0200 Subject: [Cruisecontrolrb-users] Problems with do_clean_checkout In-Reply-To: References: <670d23ff0908111424m479334f4w399abf3791ce03e0@mail.gmail.com> <648eacf20908111506k522174d0udff2751ed4503d85@mail.gmail.com> <670d23ff0908120328g2c058ed6w16002bbb803795f1@mail.gmail.com> Message-ID: <670d23ff0908141543s35db52caua7138ae6be06e805@mail.gmail.com> On Wed, Aug 12, 2009 at 18:50, Jeremy Lightsmith wrote: > Sounds like a great patch candidate I've implemented and submitted a patch https://cruisecontrolrb.lighthouseapp.com/projects/9150-cruise-control-rb/tickets/270-patch-do_clean_checkout-fixed It should be fine, I tested this on the build server of my company. Best regards, Adam PS. I'm leaving for vacation so I won't be able to respond during the next week or two. -- Adam Byrtek From starapor at thoughtworks.com Fri Aug 14 23:03:43 2009 From: starapor at thoughtworks.com (Sarah N Taraporewalla) Date: Sat, 15 Aug 2009 04:03:43 +0100 Subject: [Cruisecontrolrb-users] Sarah N Taraporewalla is out of the office. Message-ID: I will be out of the office starting 13/08/2009 and will not return until 19/08/2009. I will respond to your email upon my return....if I feel like it that is. From btguthrie at gmail.com Sat Aug 15 13:46:28 2009 From: btguthrie at gmail.com (Brian Guthrie) Date: Sat, 15 Aug 2009 12:46:28 -0500 Subject: [Cruisecontrolrb-users] Problems with do_clean_checkout In-Reply-To: <670d23ff0908141543s35db52caua7138ae6be06e805@mail.gmail.com> References: <670d23ff0908111424m479334f4w399abf3791ce03e0@mail.gmail.com> <648eacf20908111506k522174d0udff2751ed4503d85@mail.gmail.com> <670d23ff0908120328g2c058ed6w16002bbb803795f1@mail.gmail.com> <670d23ff0908141543s35db52caua7138ae6be06e805@mail.gmail.com> Message-ID: Adam - thanks so much for the patch. I've gone ahead and sent you a CCRB contributor's agreement--I'll go ahead and merge the patch locally, but I have to hold off on merging it into master until I've got your OK. Cheers, Brian On Fri, Aug 14, 2009 at 5:43 PM, Adam Byrtek wrote: > On Wed, Aug 12, 2009 at 18:50, Jeremy > Lightsmith wrote: >> Sounds like a great patch candidate > > I've implemented and submitted a patch > https://cruisecontrolrb.lighthouseapp.com/projects/9150-cruise-control-rb/tickets/270-patch-do_clean_checkout-fixed > > It should be fine, I tested this on the build server of my company. > > Best regards, > Adam > > PS. I'm leaving for vacation so I won't be able to respond during the > next week or two. > > -- > Adam Byrtek > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >