From 2ad35acc52caeb2ca48dcb883755d23103e2cb6a Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 1 Apr 2025 05:48:05 +0000
Subject: [PATCH] Fix release issues

---
 .gitignore                                    | 4 ++++
 docker/jupyter-lab/requirements.txt           | 4 +++-
 infra/jobs/station/rpc-server.levant.nomad    | 2 +-
 tangostationcontrol/devices/sdp/statistics.py | 2 +-
 tangostationcontrol/rpc/messagehandler.py     | 2 +-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 197c94213..5e9041cc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,3 +51,7 @@ infra/dev/nomad/tmp/*
 /docker/snmp-exporter/tmp/
 /docker/snmp-exporter/snmp.yml
 /.vs
+
+Lib/*
+Scripts/*
+pyvenv.cfg
diff --git a/docker/jupyter-lab/requirements.txt b/docker/jupyter-lab/requirements.txt
index c5c2a40c2..9f13475ae 100644
--- a/docker/jupyter-lab/requirements.txt
+++ b/docker/jupyter-lab/requirements.txt
@@ -5,7 +5,9 @@ notebook-as-pdf
 PyPDF2==2.12.1 # until https://github.com/betatim/notebook-as-pdf/issues/40 hits a notebook-as-pdf release
 jupyterlab-git >= 0.50.0 # BSD-3
 jupyter-collaboration >= 3.0.0 # 3-Clause BSD
-jupyter_server_nbmodel[lab,rtc] # BSD-3
+
+# disabled as it breaks on JupyterLab 4.3.5 (cells do not run)
+#jupyter_server_nbmodel[lab,rtc] # BSD-3
 
 # high-level access to station components.
 # NB: tangostationcontrol will also install lofar-station-client. The latter
diff --git a/infra/jobs/station/rpc-server.levant.nomad b/infra/jobs/station/rpc-server.levant.nomad
index 4fd85a196..5eaa7ed45 100644
--- a/infra/jobs/station/rpc-server.levant.nomad
+++ b/infra/jobs/station/rpc-server.levant.nomad
@@ -17,7 +17,7 @@ job "rpc-server" {
       }
 
       port "metrics" {
-        static       = "8000"
+        to           = "8000"
         host_network = "station"
       }
     }
diff --git a/tangostationcontrol/devices/sdp/statistics.py b/tangostationcontrol/devices/sdp/statistics.py
index 9df897b95..a0f809f24 100644
--- a/tangostationcontrol/devices/sdp/statistics.py
+++ b/tangostationcontrol/devices/sdp/statistics.py
@@ -189,7 +189,7 @@ class Statistics(OPCUADevice):
 
                     # decode payload
                     try:
-                        message = json.loads(payload.decode())
+                        message = json.loads(payload)
                     except (json.decoder.JSONDecodeError, UnicodeDecodeError):
                         logger.exception(
                             f"Could not decode message payload as JSON {topic=} {message=}"
diff --git a/tangostationcontrol/rpc/messagehandler.py b/tangostationcontrol/rpc/messagehandler.py
index 475c39557..06cce1446 100644
--- a/tangostationcontrol/rpc/messagehandler.py
+++ b/tangostationcontrol/rpc/messagehandler.py
@@ -138,7 +138,7 @@ class MultiEndpointZMQMessageHandler:
 
                     # decode payload
                     try:
-                        message = json.loads(payload.decode())
+                        message = json.loads(payload)
                     except (json.decoder.JSONDecodeError, UnicodeDecodeError):
                         logger.exception(
                             f"Could not decode message payload as JSON {uri=} {topic=} {payload=}"
-- 
GitLab