Ticket #3312 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[with patch, positive review] dsage.setup() -- very serious bug

Reported by: was Owned by: yi
Priority: blocker Milestone: sage-3.0.3
Component: dsage Keywords: editor_gfurnish
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

Do

sage: dsage.setup()

and take all the defaults, then do it again immediately but enter a non-default hostname. BOOM! See  http://sage.pastebin.com/m1ff54979 for a log of this.

The error involves sqlalchemy table insertion; somebody messed up:

    739         if not self.non_primary and '_class_state' in self.class_.__dict__ and (self.entity_name in self.class_._class_state.mappers):
--> 740              raise exceptions.ArgumentError("Class '%s' already has a primary mapper defined with entity name '%s'.  Use non_primary=True to create a non primary Mapper.  clear_mappers() will remove *all* current mappers from all classes." % (self.class_, self.entity_name))
    741 
    742         def extra_init(class_, oldinit, instance, args, kwargs):

ArgumentError: Class '<class 'sage.dsage.database.job.Job'>' already has a primary mapper defined with entity name 'None'.  Use non_primary=True to create a non primary Mapper.  clear_mappers() will remove *all* current mappers from all classes.
sage: 

Attachments

3312_clearmappers.patch Download (1.3 KB) - added by yi 2 years ago.
add clear_mapper call to db_config.py

Change History

Changed 2 years ago by yi

add clear_mapper call to db_config.py

Changed 2 years ago by yi

  • summary changed from dsage.setup() -- very serious bug to [with patch, needs review] dsage.setup() -- very serious bug

Changed 2 years ago by craigcitro

  • keywords editor_gfurnish added
  • summary changed from [with patch, needs review] dsage.setup() -- very serious bug to [with patch, under review by gfurnish before 6/20] dsage.setup() -- very serious bug

Changed 2 years ago by gfurnish

  • summary changed from [with patch, under review by gfurnish before 6/20] dsage.setup() -- very serious bug to [with patch, positive review] dsage.setup() -- very serious bug

Changed 2 years ago by gfurnish

  • summary changed from [with patch, positive review] dsage.setup() -- very serious bug to [with patch, under review] dsage.setup() -- very serious bug

Changed 2 years ago by gfurnish

  • summary changed from [with patch, under review] dsage.setup() -- very serious bug to [with patch, negative review] dsage.setup() -- very serious bug

DSage is completely broken in 3.0.2 and 3.0.3!!!!! Can you post some patches so that we can run it out of the box?

Changed 2 years ago by yi

What exactly is wrong with this patch? Use this ticket to provide feedback about this particular patch and the issue it aims to fix. File a separate bug if dsage doesn't run for you and include some actual repro steps.

Changed 2 years ago by gfurnish

  • summary changed from [with patch, negative review] dsage.setup() -- very serious bug to [with patch, positive review] dsage.setup() -- very serious bug

Changed 2 years ago by was

  • status changed from new to closed
  • resolution set to fixed

Changed 2 years ago by mabshoff

  • milestone changed from sage-3.0.4 to sage-3.0.3

Merged in Sage 3.0.3.final

Note: See TracTickets for help on using tickets.