Importing run archive from a different namespace is broken
When you import a run, the run's execId is set to the next available execId, and we attempt to increment the run's revision. Subsequent tag events on this run also increment the revision. However, if this run comes from a different namespace, it gets an entirely new lsid. There are a few problems with this at the moment:
- a subsequent export of this imported run will not contain the derivedFrom lsid. This is not currently stored in provenance. We can't tell who originally created the run.
- opening the kar again during a subsequent kepler session will again import the run with a different lsid even though it's already been imported, because the lookup to avoid this is based on the original lsid. So you end up with two runs that are the same in all ways but run lsid. This bug doesn't happen during the same kepler session.
I think the solution to these issues is to make sure WorkflowRuns are getting and storing referral list, and to then store and utilize the referral list in provenance.