Discussion and ideas to archive products done with a previous version of a pipeline and allow to create new versions.
Objective, definitions
Until now, most of our pipelines changes could be labeled as "revisions" : scripts were improved but results were expected to remain the same.
We aim now to deal with "versions" changes where a script modifications can include complete workflow overload and different (hopefully better) results.
In the event of a version change, it is expected that pre-existing products could be re-created using the newer pipelines, while keeping the previous result as an "archived" state.
Design
Archived products accessibility
Archived products are to be explicitly accessed (productid+prodtype).
There is no need to modify/have a map interface dedicated to them (which works with observations anyway, not products), and probably no need in the workspace too?
Dependencies
MarsSI products have a dependency fields since the major DB rewrite.
When a product is archived
If this products is a dependancy of other products, those products too will be archived with a version set to "depends-$origprodtype-$version"
Keeping track of dependancies in archived products
What about an archived products dependencies? We cannot archive deps at the same time, they might be still up-to-date. Forget deps as they are used foremost for procesing logic?
Implementation
Data
Files are to be moved to /data/archive/$TARGET/$INSTHOSTID/$INSTID/$VERSION (ex /data/archive/MARS/MRO/CTX/CTX_008716_1998_008782_1999/V1)
Create an archive job and trigger it from the database? Less efficient but cleaner and safer than managing DB on one hand, CPs on the other.
Database
Rework a bit the Product model:
- Create a BaseProduct abstract model: hold common fields
- Product keep the name, inherit BaseProduct and status/depends fields, most methods
- Create an ArchivedProduct modeI, BaseProduct + version fields
Web
Provide a set of search/display interface that allow for copy operations.