From 3cd8371e81a764c2d84dde15514afa8570cbc1a3 Mon Sep 17 00:00:00 2001 From: Ashley Felton Date: Tue, 9 Jan 2024 08:07:37 +0800 Subject: [PATCH 1/2] Bugfix: today's burn count might be zero, which is NOT False. --- status.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/status.py b/status.py index 78a9fd9..545c6db 100644 --- a/status.py +++ b/status.py @@ -317,17 +317,17 @@ def healthcheck_http(): output += "

\n

\n" - if d["csw_catalogue_count"]: + if "csw_catalogue_count" in d and d["csw_catalogue_count"]: # Should be >0 output += f"CSW spatial catalogue for SSS: {d['csw_catalogue_count']} layers
\n" else: output += "CSW API endpoint: error
\n" - if d["todays_burns_count"]: + if "todays_burns_count" in d: # Burns count might be 0 output += f"Today's burns count (KMI): {d['todays_burns_count']}
\n" else: output += "Today's burns count (KMI): error
\n" - if d["kmi_wmts_layer_count"]: + if d["kmi_wmts_layer_count"] and d["kmi_wmts_layer_count"]: # Should be >0 output += f"KMI WMTS layer count (public workspace): {d['kmi_wmts_layer_count']}
\n" else: output += "KMI WMTS GetCapabilities: error
\n" From aa29d282466bbe69a8d8a247dcc0ee6c1963dbe4 Mon Sep 17 00:00:00 2001 From: Ashley Felton Date: Tue, 9 Jan 2024 08:09:44 +0800 Subject: [PATCH 2/2] Bump project minor version. --- kustomize/overlays/prod/kustomization.yaml | 14 +++++++------- kustomize/overlays/uat/kustomization.yaml | 8 ++++---- poetry.lock | 18 +++++++++--------- pyproject.toml | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/kustomize/overlays/prod/kustomization.yaml b/kustomize/overlays/prod/kustomization.yaml index d99723e..9db8337 100644 --- a/kustomize/overlays/prod/kustomization.yaml +++ b/kustomize/overlays/prod/kustomization.yaml @@ -1,22 +1,22 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization nameSuffix: -prod +resources: + - ../../base + - ingress.yaml + - pdb.yaml secretGenerator: - name: healthcheck-env type: Opaque envs: - .env -resources: - - ../../base - - ingress.yaml - - pdb.yaml labels: - includeSelectors: true pairs: variant: prod -images: - - name: ghcr.io/dbca-wa/healthcheck - newTag: 1.1.16 patches: - path: deployment_patch.yaml - path: service_patch.yaml +images: + - name: ghcr.io/dbca-wa/healthcheck + newTag: 1.1.17 diff --git a/kustomize/overlays/uat/kustomization.yaml b/kustomize/overlays/uat/kustomization.yaml index 283235d..bb31774 100644 --- a/kustomize/overlays/uat/kustomization.yaml +++ b/kustomize/overlays/uat/kustomization.yaml @@ -1,15 +1,15 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization nameSuffix: -uat +resources: + - ../../base + - ingress.yaml + - pdb.yaml secretGenerator: - name: healthcheck-env type: Opaque envs: - .env -resources: - - ../../base - - ingress.yaml - - pdb.yaml labels: - includeSelectors: true pairs: diff --git a/poetry.lock b/poetry.lock index 985b689..0f0bd33 100644 --- a/poetry.lock +++ b/poetry.lock @@ -222,13 +222,13 @@ files = [ [[package]] name = "ipython" -version = "8.19.0" +version = "8.20.0" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.10" files = [ - {file = "ipython-8.19.0-py3-none-any.whl", hash = "sha256:2f55d59370f59d0d2b2212109fe0e6035cfea436b1c0e6150ad2244746272ec5"}, - {file = "ipython-8.19.0.tar.gz", hash = "sha256:ac4da4ecf0042fb4e0ce57c60430c2db3c719fa8bdf92f8631d6bd8a5785d1f0"}, + {file = "ipython-8.20.0-py3-none-any.whl", hash = "sha256:bc9716aad6f29f36c449e30821c9dd0c1c1a7b59ddcc26931685b87b4c569619"}, + {file = "ipython-8.20.0.tar.gz", hash = "sha256:2f21bd3fc1d51550c89ee3944ae04bbc7bc79e129ea0937da6e6c68bfdbf117a"}, ] [package.dependencies] @@ -461,13 +461,13 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] [[package]] name = "traitlets" -version = "5.14.0" +version = "5.14.1" description = "Traitlets Python configuration system" optional = false python-versions = ">=3.8" files = [ - {file = "traitlets-5.14.0-py3-none-any.whl", hash = "sha256:f14949d23829023013c47df20b4a76ccd1a85effb786dc060f34de7948361b33"}, - {file = "traitlets-5.14.0.tar.gz", hash = "sha256:fcdaa8ac49c04dfa0ed3ee3384ef6dfdb5d6f3741502be247279407679296772"}, + {file = "traitlets-5.14.1-py3-none-any.whl", hash = "sha256:2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74"}, + {file = "traitlets-5.14.1.tar.gz", hash = "sha256:8585105b371a04b8316a43d5ce29c098575c2e477850b62b848b964f1444527e"}, ] [package.extras] @@ -492,13 +492,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "wcwidth" -version = "0.2.12" +version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" optional = false python-versions = "*" files = [ - {file = "wcwidth-0.2.12-py2.py3-none-any.whl", hash = "sha256:f26ec43d96c8cbfed76a5075dac87680124fa84e0855195a6184da9c187f133c"}, - {file = "wcwidth-0.2.12.tar.gz", hash = "sha256:f01c104efdf57971bcb756f054dd58ddec5204dd15fa31d6503ea57947d97c02"}, + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, ] [metadata] diff --git a/pyproject.toml b/pyproject.toml index 6aca2fe..9e2e9dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "healthcheck" -version = "1.1.16" +version = "1.1.17" description = "Internal service endpoint health check for Spatial Support System" authors = ["ASI "] @@ -13,7 +13,7 @@ python-dotenv = "1.0.0" gunicorn = "21.2.0" [tool.poetry.group.dev.dependencies] -ipython = "^8.19.0" +ipython = "^8.20.0" [build-system] requires = ["poetry-core"]