microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
4 stars 3 forks source link

Expand minting service to append ID version for WorkflowExecutionActivity subclasses #537

Closed aclum closed 1 month ago

aclum commented 1 month ago

Relates to https://github.com/microbiomedata/nmdc-runtime/issues/529

Feature request: Expand minting endpoint to take a OmicsProcessing ID along with WorkflowExecutionActivity type (or Berkeley schema equivalent) and the minter would check the records in mongo and either return a new ID with a .1 or increment the existing workflow ID.

ie for OmicsProcessing document nmdc:omprc-11-123 if there is a MetagenomeAssembly document nmdc:wfmgas-11-1234.1 that was_informed_by nmdc:omprc-11-123. A user would POST to the minter endpoint the Omics Record along with the type of ID they want to mint something like:

{"OmicsProcessing":"nmdc:omprc-11-123", "schema_class": { "id": "MetagenomeAssembly" }, "how_many": 1 } The minter would return nmdc:wfmgas-11-1234.2.

We should consider race conditions here...what happens if a .2 is minted but not used and another request is made, etc.

cc @shreddd @eecavanna @scanon @corilo @picowatt

PeopleMakeCulture commented 1 month ago

Folding this issue into #529