Skip to content

Commit

Permalink
feat(engines): add workflow engine versions to info endpoint (reanahu…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alputer committed Nov 5, 2024
1 parent 15d0b97 commit d47958a
Show file tree
Hide file tree
Showing 2 changed files with 211 additions and 0 deletions.
108 changes: 108 additions & 0 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@
"description": "Request succeeded. The response contains general info about the cluster.",
"examples": {
"application/json": {
"adage_version": {
"title": "CWL version",
"value": "0.11.0"
},
"compute_backends": {
"title": "List of supported compute backends",
"value": [
Expand All @@ -429,6 +433,14 @@
"slurmcern"
]
},
"cwl_package": {
"title": "CWL package",
"value": "cwltool"
},
"cwl_version": {
"title": "CWL version",
"value": "3.1.20210628163208"
},
"dask_cluster_default_number_of_workers": {
"title": "The number of Dask workers created by default",
"value": "2Gi"
Expand Down Expand Up @@ -473,18 +485,49 @@
"title": "Maximum retention period in days for workspace files",
"value": "3650"
},
"packtivity_version": {
"title": "Packtivity version",
"value": "0.16.2"
},
"snakemake_version": {
"title": "Snakemake",
"value": "8.24.1"
},
"supported_workflow_engines": {
"title": "List of supported worfklow engines",
"value": [
"cwl",
"serial",
"snakemake",
"yadage"
]
},
"workspaces_available": {
"title": "List of available workspaces",
"value": [
"/usr/share",
"/eos/home",
"/var/reana"
]
},
"yadage_version": {
"title": "Yadage version",
"value": "0.20.1"
}
}
},
"schema": {
"properties": {
"adage_version": {
"properties": {
"title": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"compute_backends": {
"properties": {
"title": {
Expand All @@ -499,6 +542,27 @@
},
"type": "object"
},
"cwl_package": {
"properties": {
"title": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"cwl_version": {
"properties": {
"title": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
},
"dask_cluster_default_number_of_workers": {
"properties": {
"title": {
Expand Down Expand Up @@ -634,6 +698,40 @@
},
"type": "object"
},
"packtivity_version": {
"properties": {
"title": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"snakemake_version": {
"properties": {
"title": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"supported_workflow_engines": {
"properties": {
"title": {
"type": "string"
},
"value": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"workspaces_available": {
"properties": {
"title": {
Expand All @@ -647,6 +745,16 @@
}
},
"type": "object"
},
"yadage_version": {
"properties": {
"title": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"type": "object"
Expand Down
103 changes: 103 additions & 0 deletions reana_server/rest/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import logging
import traceback
from importlib.metadata import version

from flask import Blueprint, jsonify
from marshmallow import Schema, fields
Expand Down Expand Up @@ -130,6 +131,52 @@ def info(user, **kwargs): # noqa
type: string
type: array
type: object
supported_workflow_engines:
properties:
title:
type: string
value:
items:
type: string
type: array
type: object
cwl_package:
properties:
title:
type: string
value:
type: string
cwl_version:
properties:
title:
type: string
value:
type: string
type: object
yadage_version:
properties:
title:
type: string
value:
type: string
adage_version:
properties:
title:
type: string
value:
type: string
packtivity_version:
properties:
title:
type: string
value:
type: string
snakemake_version:
properties:
title:
type: string
value:
type: string
dask_enabled:
properties:
title:
Expand Down Expand Up @@ -205,6 +252,39 @@ def info(user, **kwargs): # noqa
"title": "Maximum timeout for Kubernetes jobs",
"value": "1209600"
},
"supported_workflow_engines": {
"title": "List of supported worfklow engines",
"value": [
"cwl",
"serial",
"snakemake",
"yadage"
]
},
"cwl_package": {
"title": "CWL package",
"value": "cwltool"
},
"cwl_version": {
"title": "CWL version",
"value": "3.1.20210628163208"
},
"yadage_version": {
"title": "Yadage version",
"value": "0.20.1"
},
"adage_version": {
"title": "CWL version",
"value": "0.11.0"
},
"packtivity_version": {
"title": "Packtivity version",
"value": "0.16.2"
},
"snakemake_version": {
"title": "Snakemake",
"value": "8.24.1"
},
"dask_enabled": {
"title": "Dask workflows allowed in the cluster",
"value": "False"
Expand Down Expand Up @@ -277,6 +357,21 @@ def info(user, **kwargs): # noqa
title="Maximum inactivity period in days before automatic closure of interactive sessions",
value=REANA_INTERACTIVE_SESSION_MAX_INACTIVITY_PERIOD,
),
supported_workflow_engines=dict(
title="List of supported workflow engines",
value=["cwl", "serial", "snakemake", "yadage"],
),
cwl_package=dict(title="CWL package", value="cwltool"),
cwl_version=dict(title="CWL version", value=version("cwltool")),
yadage_version=dict(title="Yadage version", value=version("yadage")),
adage_version=dict(title="Adage version", value=version("adage")),
packtivity_version=dict(
title="Packtivity version", value=version("packtivity")
),
snakemake_version=dict(
title="Snakemake version",
value=version("snakemake"),
),
dask_enabled=dict(
title="Dask workflows allowed in the cluster",
value=bool(DASK_ENABLED),
Expand Down Expand Up @@ -343,6 +438,14 @@ class InfoSchema(Schema):
StringNullableInfoValue
)
kubernetes_max_memory_limit = fields.Nested(StringInfoValue)
supported_workflow_engines = fields.Nested(ListStringInfoValue)
cwl_package = fields.Nested(StringInfoValue)
cwl_version = fields.Nested(StringInfoValue)
yadage_version = fields.Nested(StringInfoValue)
adage_version = fields.Nested(StringInfoValue)
packtivity_version = fields.Nested(StringInfoValue)
snakemake_version = fields.Nested(StringInfoValue)

dask_enabled = fields.Nested(StringInfoValue)
if DASK_ENABLED:
dask_cluster_default_number_of_workers = fields.Nested(StringInfoValue)
Expand Down

0 comments on commit d47958a

Please # to comment.