srushti / goldberg

Goldberg is a lightweight CI server written in Ruby which worries about Bundler & RVM so that you don't have to.
Other
243 stars 29 forks source link

suggestion: culprit checking code shouldn't be in view #141

Open ghost opened 11 years ago

ghost commented 11 years ago

The culprit checking code in app/views/home/_projects.html.haml shouldn't be in the view, I guess, as every time I refresh the browser and the ruby code gets reexecuted, it triggers the SCM to 'stat' and find the user who might have broken the latest build.

I refer to, specifically:

    - if !project.culprits_for_failure.empty?
      %span.culprit
        = "(Possible culprit(s): #{project.culprits_for_failure})"

I have 25 projects up, and the SCM is on another continent, it takes about 2 minutes to display it. Taking those lines out (disabling the culprit search alltogether) won't delay the site, of course.

jasim commented 11 years ago

+1

Alternatives: 1) Cache the culprit for a project till a new build is received. 2) Config to disable the culprit altogether 3) Both 2 and 3.

srushti commented 11 years ago

We can obviously just cache it for a particular build since that never changes. Also, this has never been an issue for us because all of our projects are on git and everything is local.

ghost commented 11 years ago

Sweet, thanks for the quick reply - no worries, I didn't think it was a problem for locally hosted code - it's just a suggestion, b/c remotely, it unfortunately makes the site hang for as long as it takes.

srushti commented 11 years ago

A crazy thought is to have Goldberg use git-svn for svn projects. That way all the history will be local. But, the caching thing will probably be easier.

ghost commented 11 years ago

Yes... and people without git wouldn't have to install/have git as a dependency.

srushti commented 11 years ago

I never even considered people without git using Goldberg (even if their projects are on something else), since the instructions have a 'git clone' and updating Goldberg is done through a 'git pull'.