Skip to content

Commit

Permalink
validation: make environment property mandatory in serial steps
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppe-steduto committed Nov 9, 2023
1 parent 9c6e62e commit 7a4e54d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Version 0.9.4 (UNRELEASED)

- Changes the REANA specification schema to use the ``draft 2020-12`` version of the JSON schema specification.
- Changes validation of REANA specification to expose functions for loading workflow input parameters and workflow specifications.
- Changes the validation schema of the REANA specification to make the ``environment`` property mandatory for the steps of serial workflows.
- Fixes the mounting of CVMFS volumes for the REANA deployments that use non-default Kubernetes namespace.

Version 0.9.3 (2023-09-26)
Expand Down
15 changes: 14 additions & 1 deletion reana_commons/validation/schemas/reana_analysis_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,20 @@
"specification": {
"$id": "/properties/workflow/properties/specification",
"type": "object",
"title": "Workflow specification in yaml format."
"title": "Workflow specification in yaml format.",
"properties": {
"steps": {
"id": "/properties/workflow/properties/specification/properties/steps",
"type": "array",
"title": "Serial workflow steps.",
"description": "List of steps which represent the workflow.",
"items": {
"required": [
"environment"
]
}
}
}
},
"file": {
"$id": "/properties/workflow/properties/file",
Expand Down
4 changes: 3 additions & 1 deletion reana_commons/validation/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2022 CERN.
# Copyright (C) 2022, 2023 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -77,6 +77,8 @@ def validate_reana_yaml(reana_yaml: Dict) -> Dict:
"""Validate REANA specification file according to jsonschema.
:param reana_yaml: Dictionary which represents REANA specification file.
:returns: Dictionary of non-critical warnings, in the form of
{warning_key: [warning_value1, warning_value2, ...]}.
:raises ValidationError: Given REANA spec file does not validate against
REANA specification schema.
"""
Expand Down

0 comments on commit 7a4e54d

Please sign in to comment.