#2257 Script to fix duplicate tool ordinals

v1.0.0
closed
Wolf
sf-2 (994)
General
nobody
2015-08-20
2011-06-08
No

Within each project, look for app configs with duplicate ordinals. Expand those to be unique ordinals (with Home being first, if it's one of them). Push other existing ordinals to higher values if needed.

Also needs to watch out for string ordinals and change them to ints.

Related

Tickets: #2252

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-06-10
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,1 +1,3 @@
     Within each project, look for app configs with duplicate ordinals.  Expand those to be unique ordinals (with Home being first, if it's one of them).  Push other existing ordinals to higher values if needed.
    +
    +Also needs to watch out for string ordinals and change them to ints.
    
     
  • Wolf - 2011-06-13
    • status: open --> in-progress
    • assigned_to: Wolf
     
  • Wolf - 2011-06-13
    • status: in-progress --> code-review
    • assigned_to: Wolf --> Tim Van Steenburgh
     
  • Wolf - 2011-06-13

    code on forge:wo/2257. to test, run

    allurapaste script production.ini ../scripts/update-ordinals.py test
    

    Note how many projects it examined and which it said would be renumbered. Is the number of projects correct? Use a paster shell to look at some projects:

    from allura import model as M
    p = M.Project.query.find(dict(shortname='someproject')).first()
    [ m['ordinal'] for m in p.ordered_mounts(include_search=True) ]
    

    Use that technique to verify that a mentioned project was indeed broken, and also that some project not mentioned was not broken. Then rerun the allurapaste script command without the trailing 'test' argument. Use a paster shell to examine mentioned projects and verify that they are now no longer broken. Where by broken I mean had duplicate ordinals in its list of mounts.

     
  • Looks good, merged to dev.

    • status: code-review --> closed
    • assigned_to: Tim Van Steenburgh --> Wolf
     

Log in to post a comment.