[katello-devel] No more commits to master!

Jeff Weiss jweiss at redhat.com
Wed May 25 19:42:40 UTC 2011


On Tue, 2011-05-24 at 18:02 -0700, Mike McCune wrote:
> I spent some time this afternoon looking at the failed unit tests in 
> master and fixed the one in OrganizationsController but there are still 
> 3 remaining that are broken:
> 
> Failures:
> 
>    1) ResourcePermissions ResourcePermissions for Candlepin should 
> create set of permissions for new owner and delete after destroy
>       Failure/Error: 
> Candlepin::CandlepinResourcePermissions::after_post_callback('/candlepin/owners/', 
> nil, nil, to_response)
>       ArgumentError:
>         user has no own role
>       # ./app/models/user.rb:100:in `allow'
>       # ./lib/resources/candlepin.rb:55
>       # ./lib/resource_permissions.rb:79:in `call'
>       # ./lib/resource_permissions.rb:79:in `call_actions'
>       # ./lib/resource_permissions.rb:72:in `each'
>       # ./lib/resource_permissions.rb:72:in `call_actions'
>       # ./lib/resource_permissions.rb:106:in `after_post_callback'
>       # ./spec/models/resource_perm_spec.rb:38
> 
>    2) Api::RepositoriesController create a repository should call pulp 
> and candlepin layer
>       Failure/Error: post 'create', :name => 'repo_1', :url => 
> 'http://www.repo.org', :product_id => 'product_1'
>       ActionController::RoutingError:
>         No route matches {:action=>"create", :product_id=>"product_1", 
> :name=>"repo_1", :url=>"http://www.repo.org", 
> :controller=>"api/repositories"}
>       # ./spec/controllers/api/repositories_controller_spec.rb:17
> 
>    3) EnvironmentsController GET edit assigns the requested environment 
> as @environment
>       Failure/Error: get :edit, :id => @env.id, :organization_id => 
> @org.cp_key
>         Mock KPEnvironment(id: integer, name: string, description: 
> string, locker: boolean, organization_id: integer, changeset_id: 
> integer, changeset_history_id: integer, created_at: datetime, 
> updated_at: datetime) received unexpected message :path with (no args)
>       # ./app/controllers/environments_controller.rb:46:in `edit'
>       # ./lib/util/threadsession.rb:79:in `thread_locals'
>       # ./spec/controllers/environments_controller_spec.rb:70
> 
> 
> I tried to fix (1) but wasn't quite sure what was going on there.  Can 
> we get some volunteers to fix the above issues before *anything* else 
> goes into master?
> 
> I propose a simple rule:
> 
> *** No commits to master until unit tests are green ***
> 
> Mike

I propose that we at least redefine master to mean all unit tests are
green (meaning no commits pushed to master until the unit tests all pass
on that commit).

How that's accomplished is up to dev, but I should point out that hudson
is capable of polling ALL branches for commits and kicking off unit
tests on them.  So you could just commit on your branch, wait a few
minutes for hudson to test it, and if it passes, merge to master.

Jeff







More information about the katello-devel mailing list