From c31c5d8ff13529f4a8565d54953a8691cda500e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Wed, 2 Oct 2024 09:05:39 +0200 Subject: [PATCH 1/2] Avoid possible UnboundLocalError for end_event The error has been observed to occur in the log. Not trying to display further error messages to why it is None. --- src/ert/cli/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ert/cli/main.py b/src/ert/cli/main.py index 36d2bc1f625..1e4a2af3c2e 100644 --- a/src/ert/cli/main.py +++ b/src/ert/cli/main.py @@ -13,7 +13,7 @@ from ert.cli.monitor import Monitor from ert.cli.workflow import execute_workflow from ert.config import ErtConfig, QueueSystem -from ert.ensemble_evaluator import EvaluatorServerConfig +from ert.ensemble_evaluator import EndEvent, EvaluatorServerConfig from ert.mode_definitions import ( ENSEMBLE_EXPERIMENT_MODE, ENSEMBLE_SMOOTHER_MODE, @@ -128,6 +128,7 @@ def run_cli(args: Namespace, plugin_manager: Optional[ErtPluginManager] = None) out = sys.stderr monitor = Monitor(out=out, color_always=args.color_always) thread.start() + end_event: Optional[EndEvent] = None try: end_event = monitor.monitor( status_queue, ert_config.analysis_config.log_path @@ -139,7 +140,7 @@ def run_cli(args: Namespace, plugin_manager: Optional[ErtPluginManager] = None) thread.join() storage.close() - if end_event.failed: + if end_event is not None and end_event.failed: # If monitor has not reported, give some info if the job failed msg = end_event.msg if args.disable_monitoring else "" raise ErtCliError(msg) From f8a162f195a19767c52687f21ae0a36b1da5a8ae Mon Sep 17 00:00:00 2001 From: larsevj Date: Thu, 10 Oct 2024 09:47:19 +0200 Subject: [PATCH 2/2] Pin ubuntu runner image in test_ert_with_slurm workflow --- .github/workflows/test_ert_with_slurm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_ert_with_slurm.yml b/.github/workflows/test_ert_with_slurm.yml index 0770f3ee6a6..23ff18d59b5 100644 --- a/.github/workflows/test_ert_with_slurm.yml +++ b/.github/workflows/test_ert_with_slurm.yml @@ -10,7 +10,7 @@ jobs: test-ert-on-slurm: name: Run ert tests timeout-minutes: 20 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4