From a24c810f018e5fd925d9ad01ce986537adad7ee8 Mon Sep 17 00:00:00 2001 From: Alputer Date: Fri, 31 Jan 2025 11:59:55 +0100 Subject: [PATCH] fix(config): set localhost default value for REANA_HOSTNAME (#717) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-workflow-controller#630 Closes reanahub/reana#865 --- reana_server/config.py | 4 ++-- reana_server/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reana_server/config.py b/reana_server/config.py index 0afed22c..0339381b 100644 --- a/reana_server/config.py +++ b/reana_server/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of REANA. -# Copyright (C) 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 CERN. +# Copyright (C) 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025 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. @@ -32,7 +32,7 @@ SHARED_VOLUME_PATH = os.getenv("SHARED_VOLUME_PATH", "/var/reana") -REANA_HOSTNAME = os.getenv("REANA_HOSTNAME") +REANA_HOSTNAME = os.getenv("REANA_HOSTNAME", "localhost") REANA_SSO_CERN_CONSUMER_KEY = os.getenv("CERN_CONSUMER_KEY", "CHANGE_ME") REANA_SSO_CERN_CONSUMER_SECRET = os.getenv("CERN_CONSUMER_SECRET", "CHANGE_ME") diff --git a/reana_server/utils.py b/reana_server/utils.py index 6f762dc2..8662d77f 100644 --- a/reana_server/utils.py +++ b/reana_server/utils.py @@ -537,7 +537,7 @@ def __len__(self): def get_workspace_retention_rules( - retention_days: Optional[Dict[str, int]] + retention_days: Optional[Dict[str, int]], ) -> List[Dict[str, any]]: """Validate and return a list of retention rules.