Cart editing: Difference between revisions

From genomewiki
Jump to navigationJump to search
(Created page with "If we make a new superTrack and move an existing track into it, then we have a problem with old sessions, ones that predate this change: If you load an old saved session, the...")
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If we make a new superTrack and move an existing track into it, then we have a problem with old sessions, ones that predate this change:
If we make a new superTrack and move an existing track into it, then we have a problem with old sessions, ones that predate this change:


If you load an old saved session, the was saved before the superTrack-move and the session has this track on, then the track disappears if you load the session after the superTrack-move, and there is no error at all.  
* If you load an old saved session with a certain track on and it was saved before the superTrack-move, then the track disappears. There is no error at all.  


This is because the superTracks is not set to "show" in the old cart.
This is because the superTrack is not set to "show" in the old cart. Cart editing with "cartVersion" solves this. Cart editing consists of two parts:


Cart editing solves this. Cart editing consists of two parts:
* A version number for trackDb, always written into all saved carts, so we can distinguish old from new carts.
* A piece of C code that adds a new cart variable, always when a cart that is loaded, anytime or anywhere from any CGI and that cart is is older than the current trackDb. It's called from cart.c
  ~/kent/src/hg/lib/cartRewrite.c
* hg.conf statement to turn on cartVersion edits


* a version number for trackDb, always written into all saved carts, so we can distinguish old from new carts.
Process:
* a piece of C code (in cartEdit.c called from cart.c) that adds a new cart variable, always when a cart that is loaded, anytime or anywhere from any CGI and that cart is is older than the current trackDb.
# QA makes list of tracks to change and supertrack names
# QA creates a session with each track on
# QA adds those tracks to a new supertrack in trackDb
#* Add release tags to keep any changes from sneaking out to the RR
#* Do NOT add the <code>cartVersion N</code> line to the supertrack as it will cause errors if added before the code changes are added!
# Engineer adds code to cartRewrite.c
# Engineer adds the <code>cartVersion N</code> line to each new supertrack
# QA checks their old session to validate engineer's change worked


So, before you move a track into a new superTrack you must do one thing:
Then wait until the code goes out the normal way to the RR. After the release, any time, you can do these two things:


  ask an engineer to add code to cartEdit.c
# increase the version number in the top-level trackDb.ra file for that track, at the top
# add the superTrack and move the old track into it


Then wait until the code goes out the normal way to the RR. After the release, any time, you can do these two things:
See ticket:
https://redmine.soe.ucsc.edu/issues/26719


1) increase the version number in the top-level trackDb.ra file, at the top
See slideshow:
2) add the superTrack and move the old track into it
http://genomewiki.ucsc.edu/images/9/99/CartVersion_and_cartRewrite.c.pdf

Latest revision as of 20:08, 6 August 2021

If we make a new superTrack and move an existing track into it, then we have a problem with old sessions, ones that predate this change:

  • If you load an old saved session with a certain track on and it was saved before the superTrack-move, then the track disappears. There is no error at all.

This is because the superTrack is not set to "show" in the old cart. Cart editing with "cartVersion" solves this. Cart editing consists of two parts:

  • A version number for trackDb, always written into all saved carts, so we can distinguish old from new carts.
  • A piece of C code that adds a new cart variable, always when a cart that is loaded, anytime or anywhere from any CGI and that cart is is older than the current trackDb. It's called from cart.c
 ~/kent/src/hg/lib/cartRewrite.c
  • hg.conf statement to turn on cartVersion edits

Process:

  1. QA makes list of tracks to change and supertrack names
  2. QA creates a session with each track on
  3. QA adds those tracks to a new supertrack in trackDb
    • Add release tags to keep any changes from sneaking out to the RR
    • Do NOT add the cartVersion N line to the supertrack as it will cause errors if added before the code changes are added!
  4. Engineer adds code to cartRewrite.c
  5. Engineer adds the cartVersion N line to each new supertrack
  6. QA checks their old session to validate engineer's change worked

Then wait until the code goes out the normal way to the RR. After the release, any time, you can do these two things:

  1. increase the version number in the top-level trackDb.ra file for that track, at the top
  2. add the superTrack and move the old track into it

See ticket:

https://redmine.soe.ucsc.edu/issues/26719

See slideshow:

http://genomewiki.ucsc.edu/images/9/99/CartVersion_and_cartRewrite.c.pdf