#3400 Installed ForgeChat in bootstrap.py has blank channel

unreleased
open
nobody
Other
nobody
2015-03-12
2011-12-06
karsten
No

When paster setup-app is run, the ForgeChat-created ChatChannel on the default project has a channel of ''. While this works for the first time, if say, more than one project were to be created in setup-app, this would fail.

The error is a little hard to debug, as it will occur only when the session is being flushed, as a DuplicateKeyError, with no reference to ChatChannel. I thought it was about another Tool altogether (downloads) which happened to show up next in entry_points and flush.

Presumably, this is because the options created for the ForgeChat in allura.model.Project.install_app do not contain a channel value.

Possible solutions (not sure which one makes the most sense):

  • remove the unique_index on ChatChannel
  • Allow Tools to specify a default_override_options callback so that an app can make something up
  • Have ForgeChat specify a default value of, say, #<projectname> if one isn't in options
  • Allow Tools to specify install_on_setup (default True) if ForgeChat shouldn't be installed by default

Related

Tickets: #7946

Discussion


Log in to post a comment.