#258 open
Kris Kemper

superclass mismatch for class BuildReaper with new project

Reported by Kris Kemper | July 5th, 2009 @ 09:17 AM | in current

UPDATE**

The error was introduced by commit 6731b7adfca98e57b5c7db363420b148040f796b.

I cloned the latest git version of cruisecontrolrb.

The last commit on that version was:

commit de819e6f63027e00d9389facc8c3f5ffba8c612b
Author: Brian Guthrie btguthrie@gmail.com
Date: Wed Jul 1 15:13:16 2009 -0500

Project#notify raises an exception if you try to notify plugins of an event that

I create a new project against a git repository, I tried cruisecontrolrb first, but then tried Drew Olson's Diggr gem (if you test with this gem, you need to do a gem install diggr for a rake build to pass).

./cruise add diggr -r git://github.com/drewolson/diggr.git -s git

On the latest version of cruisecontrol, I get:

superclass mismatch for class BuildReaper

RAILS_ROOT: /home/kris/programming/oss/cruisecontrol.rb
Application Trace | Framework Trace | Full Trace

/home/kris/programming/oss/cruisecontrol.rb/lib/builder_plugins/build_reaper.rb:6 /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:487:in load_plugin' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:503:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:496:in each' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:496:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:522 /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:18:in load_project' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:33:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:32:in collect' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:32:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:7:in load_all' /home/kris/programming/oss/cruisecontrol.rb/app/controllers/projects_controller.rb:10:inindex'

/home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:in load_without_new_constant_marking' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in new_constants_in' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in load_without_new_constant_marking' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_file' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in new_constants_in' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:inload_file' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in require_or_load' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:inload_missing_constant' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:in const_missing' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:1322:insend' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:1322:in perform_action_without_filters' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/filters.rb:617:incall_filters' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in perform_action_without_benchmark' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in ms' /usr/lib/ruby/1.8/benchmark.rb:308:inrealtime' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in ms' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in perform_action_without_flash' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/flash.rb:141:inperform_action' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:523:in send' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:523:inprocess_without_filters' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in process' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:391:inprocess' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:386:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:433:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:88:in dispatch' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:111:in_call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:82:in initialize' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb:9:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb:9:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb:24:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/rewindable_input.rb:25:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/reloader.rb:9:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/failsafe.rb:11:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:in synchronize' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/railties/lib/rails/rack/static.rb:31:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:46:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:40:ineach' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:40:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/content_length.rb:13:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb:46:inservice' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun' /usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart' /usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart' /usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart' /usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb:13:in run' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/railties/lib/commands/server.rb:111 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in require' script/server:3

/home/kris/programming/oss/cruisecontrol.rb/lib/builder_plugins/build_reaper.rb:6 /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:in load_without_new_constant_marking' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in new_constants_in' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:487:in load_plugin' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:503:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:496:in each' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:496:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/project.rb:522 /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in load_without_new_constant_marking' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_file' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in new_constants_in' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:inload_file' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in require_or_load' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:inload_missing_constant' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:in const_missing' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:18:inload_project' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:33:in load_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:32:incollect' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:32:in load_all' /home/kris/programming/oss/cruisecontrol.rb/app/models/projects.rb:7:inload_all' /home/kris/programming/oss/cruisecontrol.rb/app/controllers/projects_controller.rb:10:in index' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:1322:insend' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:1322:in perform_action_without_filters' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/filters.rb:617:incall_filters' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in perform_action_without_benchmark' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in ms' /usr/lib/ruby/1.8/benchmark.rb:308:inrealtime' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in ms' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in perform_action_without_flash' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/flash.rb:141:inperform_action' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:523:in send' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:523:inprocess_without_filters' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in process' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:391:inprocess' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/base.rb:386:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:433:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:88:in dispatch' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:111:in_call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:82:in initialize' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb:9:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb:9:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb:24:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/rewindable_input.rb:25:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/reloader.rb:9:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/failsafe.rb:11:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:in synchronize' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/railties/lib/rails/rack/static.rb:31:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:46:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:40:ineach' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:40:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:incall' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/content_length.rb:13:in call' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb:46:inservice' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun' /usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart' /usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart' /usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart' /usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb:13:in run' /home/kris/programming/oss/cruisecontrol.rb/vendor/rails/railties/lib/commands/server.rb:111 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in require' script/server:3

This error occurred while loading the following files:
build_reaper.rb


I tried this against cruisecontrolrb 1.4 and the error did not occur.

Comments and changes to this ticket

  • Brian Guthrie

    Brian Guthrie July 5th, 2009 @ 08:14 PM

    • Milestone set to current
    • State changed from “new” to “open”

    Hey Kris - I tried this on CruiseControl.rb HEAD and couldn't reproduce it. Does it happen as soon as you add the project, or when you try to build it?

    I recently committed a new builder plugin superclass in an attempt to clean up and better document notification events and if you have a copy of the build_reaper plugin getting loaded somewhere that doesn't reference the new BuilderPlugin superclass you'll receive this error. I'm just not sure from the stack trace where it's coming from.

  • Kris Kemper

    Kris Kemper July 5th, 2009 @ 09:33 PM

    Interestingly, adding a comment by email got rejected by lighthouse due to privileges.

    Anyway,

    It happens once I first add a new project. Once I do that though, the localhost:3000 index page shows the error.

    I have a pretty vanilla ubuntu instance with minimal environmental baggage. I checked out the latest as of yesterday, and I encountered that bug. However, when I did a git checkout of the revision before 6731b7adfca98e57b5c7db363420b148040f796b then I don't get the error.

    I inspected the ancestors of the Builder plugin before the error occurs in project, and it looked okay. That is, it wasn't showing Object as it's only superclass or something obviously erroneous like that.

    I'm inclined to think that you might have something in your environment that is getting used due to the fresh nature of my ubuntu environment (which I just setup in the last week). Perhaps there is something subtle happening to the order of class loading across the environments?

    I can try to investigate more tomorrow night. All the tests pass on my machine though, and I would think there is at least one functional that hits the project list page.

  • Kris Kemper

    Kris Kemper July 6th, 2009 @ 09:54 PM

    Some more information. I can make the problem go away by explicitly loading or requiring the builder_plugin.rb file at any time before the plugin load logic in Project.

    However, I can also make the problem go away be commenting out line 487 in Project.rb, 'load plugin_path'

    Some more environment context. Though I have a .cruise directory in my home directory, I haven't created any custom plugins, so all plugin loading uses the cruisecontrolrb defaults.

    Also, I printed out the names of plugins that it tries to load in Project::plugin_loader.load_plugin, and it picks up builder_plugin.rb, which I'm guessing is not meant to be overridden by a custom implementation.

    Anyway, the fix that seems best is to put a require 'lib/builder_plugins/build_plugin' in environment.rb at the end of the require list.

    Thought I don't know the root cause of the superclass mismatch error, I suspect it has something to do with the loading order of those plugins, either because a users home .cruise is in the load path for plugins, or because builder_plugin.rb is loaded as one of the plugins, but after it's used as a superclass to the other plugins.

    I'll try to write a test around this.

    -Kris

  • Kris Kemper

    Kris Kemper July 6th, 2009 @ 09:55 PM

    Sorry, that fix should read:

    require 'lib/builder_plugins/builder_plugin' in environment.rb

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Tags

Pages