From thewoolleyman at gmail.com Fri Jan 1 05:39:52 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 1 Jan 2010 03:39:52 -0700 Subject: [Cruisecontrolrb-developers] Caching? Message-ID: Has anybody hacked caching into CCRB? For a public server, the rss and ccmenu resources should be cached, or else it kills the server when a bunch of people hit the single mongrel. From thewoolleyman at gmail.com Mon Jan 11 21:16:31 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 11 Jan 2010 19:16:31 -0700 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? Message-ID: Setting polling_interval will only cause build if there are changes. I want to build always on a schedule (yes I have a good reason). I can't see an easy way to make this happen - it would take some hacking on SuccessfulBuildTrigger and/or PollingScheduler. Has anyone made this work? I seem to remember it being discussed, but don't see anything in the source... -- Chad From thewoolleyman at gmail.com Mon Jan 11 22:34:28 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 11 Jan 2010 20:34:28 -0700 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: On Mon, Jan 11, 2010 at 7:16 PM, Chad Woolley wrote: > Has anyone made this work? ?I seem to remember it being discussed, but > don't see anything in the source... Just committed a change to support this: http://github.com/thoughtworks/cruisecontrol.rb/commit/0cd553ffd5d6ed249508954bb305ba18e9000459 Lemme know if there are any problems. Also, looks like CI is working again. Good! -- Chad From btguthrie at gmail.com Mon Jan 11 22:41:07 2010 From: btguthrie at gmail.com (Brian Guthrie) Date: Tue, 12 Jan 2010 03:41:07 +0000 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: Hi Chad, I built a plugin a little while back that acts as a separate trigger, but your way seems much simpler. Thoughts? Would be happy to commit this if it seems preferable. Brian class ScheduledBuildTrigger attr_accessor :build_interval def initialize(triggered_project, opts={}) @triggered_project = triggered_project @build_interval = opts[:build_interval] || 24.hours @next_build_time = opts[:start_time] || calculate_next_build_time end def build_necessary?(reasons) if @triggered_project.build_requested? || time_for_new_build? @next_build_time = calculate_next_build_time true end end def calculate_next_build_time Time.now + @build_interval end def time_for_new_build? Time.now >= @next_build_time end end On Tue, Jan 12, 2010 at 3:34 AM, Chad Woolley wrote: > On Mon, Jan 11, 2010 at 7:16 PM, Chad Woolley wrote: >> Has anyone made this work? ?I seem to remember it being discussed, but >> don't see anything in the source... > > Just committed a change to support this: > > http://github.com/thoughtworks/cruisecontrol.rb/commit/0cd553ffd5d6ed249508954bb305ba18e9000459 > > Lemme know if there are any problems. > > Also, looks like CI is working again. ?Good! > > -- Chad > _______________________________________________ > Cruisecontrolrb-developers mailing list > Cruisecontrolrb-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers > From thewoolleyman at gmail.com Mon Jan 11 23:13:02 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 11 Jan 2010 21:13:02 -0700 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: On Mon, Jan 11, 2010 at 8:41 PM, Brian Guthrie wrote: > Hi Chad, > > I built a plugin a little while back that acts as a separate trigger, > but your way seems much simpler. Thoughts? Would be happy to commit > this if it seems preferable. This seems cleaner. I was lazy so I just hacked it onto the polling scheduler. Not sure how you configure it, though - It should have an example of how to use it in the cruise_config example. I'm fine if you want to commit this and revert mine. I just need to have something working by tomorrow, so give me a heads up if you revert so I can switch over to yours. -- Chad From btguthrie at gmail.com Tue Jan 12 02:55:51 2010 From: btguthrie at gmail.com (Brian Guthrie) Date: Tue, 12 Jan 2010 07:55:51 +0000 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: Hi Chad, I've pushed in the ScheduledBuildTrigger and the build passes. Let me know if you run into any issues. Cheers, Brian On Tue, Jan 12, 2010 at 4:13 AM, Chad Woolley wrote: > On Mon, Jan 11, 2010 at 8:41 PM, Brian Guthrie wrote: >> Hi Chad, >> >> I built a plugin a little while back that acts as a separate trigger, >> but your way seems much simpler. Thoughts? Would be happy to commit >> this if it seems preferable. > > This seems cleaner. ?I was lazy so I just hacked it onto the polling > scheduler. ?Not sure how you configure it, though - ? It should have > an example of how to use it in the cruise_config example. > > I'm fine if you want to commit this and revert mine. ?I just need to > have something working by tomorrow, so give me a heads up if you > revert so I can switch over to yours. > > -- Chad > _______________________________________________ > Cruisecontrolrb-developers mailing list > Cruisecontrolrb-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers > From thewoolleyman at gmail.com Tue Jan 12 18:35:46 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 12 Jan 2010 16:35:46 -0700 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: On Tue, Jan 12, 2010 at 12:55 AM, Brian Guthrie wrote: > Hi Chad, > > I've pushed in the ScheduledBuildTrigger and the build passes. Let me > know if you run into any issues. One problem with this is that it won't build if there are SCM changes (which I want, and my prior change supported). Should we put my changes back and support both approaches? If this is OK, I'll do it, and put appropriate explaination in cruise config example. From btguthrie at gmail.com Tue Jan 12 18:39:41 2010 From: btguthrie at gmail.com (Brian Guthrie) Date: Tue, 12 Jan 2010 23:39:41 +0000 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: Sure, I buy that. Go for it. On Tue, Jan 12, 2010 at 11:35 PM, Chad Woolley wrote: > On Tue, Jan 12, 2010 at 12:55 AM, Brian Guthrie wrote: >> Hi Chad, >> >> I've pushed in the ScheduledBuildTrigger and the build passes. Let me >> know if you run into any issues. > > One problem with this is that it won't build if there are SCM changes > (which I want, and my prior change supported). ?Should we put my > changes back and support both approaches? ?If this is OK, I'll do it, > and put appropriate explaination in cruise config example. > _______________________________________________ > Cruisecontrolrb-developers mailing list > Cruisecontrolrb-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers > From btguthrie at gmail.com Fri Jan 15 11:54:32 2010 From: btguthrie at gmail.com (Brian Guthrie) Date: Fri, 15 Jan 2010 08:54:32 -0800 Subject: [Cruisecontrolrb-developers] Caching? In-Reply-To: References: Message-ID: Hi Chad - I took a look at this last night but I couldn't find an easy way to expire the cache. We can't use a stock Rails sweeper, and although we can probably work on our performance a little bit at the controller action level I don't know how much Rails caching buys us. Did take a shot at hacking it in at your end? Brian On Fri, Jan 1, 2010 at 2:39 AM, Chad Woolley wrote: > Has anybody hacked caching into CCRB? ?For a public server, the rss > and ccmenu resources should be cached, or else it kills the server > when a bunch of people hit the single mongrel. > _______________________________________________ > Cruisecontrolrb-developers mailing list > Cruisecontrolrb-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers > From thewoolleyman at gmail.com Fri Jan 15 12:36:30 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 15 Jan 2010 10:36:30 -0700 Subject: [Cruisecontrolrb-developers] Caching? In-Reply-To: References: Message-ID: On Fri, Jan 15, 2010 at 9:54 AM, Brian Guthrie wrote: > Hi Chad - I took a look at this last night but I couldn't find an easy > way to expire the cache. We can't use a stock Rails sweeper, and > although we can probably work on our performance a little bit at the > controller action level I don't know how much Rails caching buys us. > Did take a shot at hacking it in at your end? > > Brian No, but I think if we cache just the high-traffic pages (dashboard, rss feed, ccmenu feed) that will solve the problem. It should be possible to come up with a sweeper strategy that works - it could be as simple as expiring everything whenever any project builds or is building. Then you just stick a web server in front with the standard rails caching entry (serve html if it exists) then the problem is fixed.) From thewoolleyman at gmail.com Wed Jan 27 05:08:41 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Wed, 27 Jan 2010 03:08:41 -0700 Subject: [Cruisecontrolrb-developers] Caching? In-Reply-To: References: Message-ID: On Fri, Jan 15, 2010 at 9:54 AM, Brian Guthrie wrote: > Hi Chad - I took a look at this last night but I couldn't find an easy > way to expire the cache. We can't use a stock Rails sweeper, and > although we can probably work on our performance a little bit at the > controller action level I don't know how much Rails caching buys us. > Did take a shot at hacking it in at your end? Yes, but I also found it didn't work: http://gist.github.com/287705 Were these the problems you had? Josh Susser suggested we try Varnish... From alexey.verkhovsky at gmail.com Wed Jan 27 12:15:22 2010 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 27 Jan 2010 10:15:22 -0700 Subject: [Cruisecontrolrb-developers] Caching? In-Reply-To: References: Message-ID: <3945c4271001270915t1d35f7b0q4c9a048ac6b5e5b3@mail.gmail.com> > controller action level I don't know how much Rails caching buys us. Two thoughts on the subject: * anything that bypasses reading data from the file system would make a lot of difference. * you can see if the data needs to be re-read by loking at the mtime of ~/.cruise/projects/MyProject directory. If that directory changed, it means there is new state. So, just caching Project#builds for as long as mtime of Project#path stays the same may be the ticket. -- Alexey Verkhovsky http://alex-verkhovsky.blogspot.com/ CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] -------------- next part -------------- An HTML attachment was scrubbed... URL: From btguthrie at gmail.com Wed Jan 27 12:24:44 2010 From: btguthrie at gmail.com (Brian Guthrie) Date: Wed, 27 Jan 2010 09:24:44 -0800 Subject: [Cruisecontrolrb-developers] Caching? In-Reply-To: <3945c4271001270915t1d35f7b0q4c9a048ac6b5e5b3@mail.gmail.com> References: <3945c4271001270915t1d35f7b0q4c9a048ac6b5e5b3@mail.gmail.com> Message-ID: Huh, that's a good thought. My confusion centered around how to expire the cache from the controller standpoint when each individual project decides for itself when to build - expiring through the Build action wouldn't work, I think, because not every build event falls through that action. Right? But caching on the filesystem level makes sense. I'll take a stab at it. Brian On Wed, Jan 27, 2010 at 9:15 AM, Alexey Verkhovsky wrote: >> controller action level I don't know how much Rails caching buys us. > > Two thoughts on the subject: > > * anything that bypasses reading data from the file system would make a lot > of difference. > > * you can see if the data needs to be re-read by loking at the mtime of > ~/.cruise/projects/MyProject directory. If that directory changed, it means > there is new state. > > So, just caching Project#builds for as long as mtime of Project#path stays > the same may be the ticket. > > -- > Alexey Verkhovsky > http://alex-verkhovsky.blogspot.com/ > CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] > > > _______________________________________________ > Cruisecontrolrb-developers mailing list > Cruisecontrolrb-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers > > From alexey.verkhovsky at gmail.com Wed Jan 27 12:34:14 2010 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 27 Jan 2010 10:34:14 -0700 Subject: [Cruisecontrolrb-developers] Caching? In-Reply-To: References: <3945c4271001270915t1d35f7b0q4c9a048ac6b5e5b3@mail.gmail.com> Message-ID: <3945c4271001270934i3c241cc5tcc17b397447e0b8d@mail.gmail.com> On Wed, Jan 27, 2010 at 10:24 AM, Brian Guthrie wrote: > I'll take a stab at it. > That'd be awfully nice. Keep in mind that you'd have to also cache a collection of projects instances used by the frontend, and that this cache should handle adding/deleting/renaming of projects. -- Alexey Verkhovsky http://alex-verkhovsky.blogspot.com/ CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Sun Jan 31 01:20:47 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Sat, 30 Jan 2010 23:20:47 -0700 Subject: [Cruisecontrolrb-developers] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: On Tue, Jan 12, 2010 at 4:39 PM, Brian Guthrie wrote: > Sure, I buy that. Go for it. Added back: http://github.com/thoughtworks/cruisecontrol.rb/commit/ac38eeda532b34a60364cc02ab7b9ed8822a695d