cwlviewer icon indicating copy to clipboard operation
cwlviewer copied to clipboard

Improve handling of versioning for workflows

Open MarkRobbo opened this issue 8 years ago • 1 comments

Currently on /workflows every version of the workflow is shown. Over time this can mean large numbers of versions for a single workflow.

Ideally they would be collapsed to the most popular (or master) version and have + x other versions with a dropdown or list in order to not clutter the table.

These other versions could also be shown on the main workflow page.

MarkRobbo avatar Jul 03 '17 15:07 MarkRobbo

Query from the Wiki (in case we decide to archive that page): https://github.com/common-workflow-language/cwlviewer/wiki/MongoDB-Queries



This is a page to design MongoDB queries for common-workflow-language/cwlviewer#117

Gets, where retrievedFrom.repoUrl and retrievedFrom.path are the same, the last instance of a workflow (random, no real defined order)

db.workflow.aggregate(
  [
    {
      $group: {
        _id: {"retrievedFrom.repoUrl": "$retrievedFrom.repoUrl", "retrievedFrom.path": "$retrievedFrom.path"},
        workflow: { '$last': '$$ROOT' }, 
        versions: { '$addToSet': '$retrievedFrom.branch' }
      }
    }
  ]
)

TODO: Brainstorm criteria for which 'main' version to use, e.g. default to 'master' if it exists, otherwise a branch name over a commit ID etc

kinow avatar Jun 20 '22 21:06 kinow