From 722384f7028e9f8f0e682e2e1d990753c2210fd4 Mon Sep 17 00:00:00 2001 From: wcpettus Date: Fri, 6 Mar 2026 18:15:42 -0500 Subject: [PATCH 1/8] protect scheduled_log from get/calibrate errors, force dict calibrations to map by string matching scarab readin pattern --- dripline/core/calibrate.py | 4 ++-- dripline/core/entity.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dripline/core/calibrate.py b/dripline/core/calibrate.py index f9c50ab8..e39e6859 100644 --- a/dripline/core/calibrate.py +++ b/dripline/core/calibrate.py @@ -49,8 +49,8 @@ def wrapper(self, *args, **kwargs): val_dict['value_cal'] = cal elif isinstance(self._calibration, dict): logger.debug('calibration is dictionary, looking up value') - if val_dict['value_raw'] in self._calibration: - val_dict['value_cal'] = self._calibration[val_dict['value_raw']] + if str(val_dict['value_raw']) in self._calibration: + val_dict['value_cal'] = self._calibration[str(val_dict['value_raw'])] else: raise ThrowReply('service_error_invalid_value', f"raw value <{repr(val_dict['value_raw'])}> not in cal dict") else: diff --git a/dripline/core/entity.py b/dripline/core/entity.py index fae6ae3b..d22d69cb 100644 --- a/dripline/core/entity.py +++ b/dripline/core/entity.py @@ -176,8 +176,12 @@ def log_interval(self, new_interval): raise ThrowReply('service_error_invalid_value', f"unable to interpret a new_interval of type <{type(new_interval)}>") def scheduled_log(self): - logger.debug("in a scheduled log event") - result = self.on_get() + logger.debug(f"in a scheduled log event for {self.name}") + try: + result = self.on_get() + except ThrowReply as err: + logger.warning(f'scheduled log failed with error:\n{err}') + return try: this_value = float(result[self._check_field]) is_float = True From 0be97513cd7a5bd96041ec7d32467fedb838ca90 Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Thu, 30 Apr 2026 11:18:28 -0700 Subject: [PATCH 2/8] Adding workflow dispatch options to the GHA workflow --- .github/workflows/publish.yaml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8b4d4f3f..6a2d1be5 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,6 +6,18 @@ on: tags: ['*'] pull_request: workflow_dispatch: + keep-test-image: + description: "Keep the Test Image (set to 'true' to keep the image)" + required: true + default: "false" + test-image-tag-suffix: + description: "Suffix for Test Image Tag" + required: false + default: "" + dl-cpp-tag-override: + description: "Override the dl-cpp version tag" + required: false + default: "" env: REGISTRY: ghcr.io @@ -13,7 +25,7 @@ env: BASE_IMAGE_USER: ghcr.io/driplineorg BASE_IMAGE_REPO: dripline-cpp DEV_SUFFIX: '-dev' - BASE_IMAGE_TAG: 'v2.10.11' + BASE_IMAGE_TAG: "${{ github.event.inputs.dl-cpp-tag-override == '' && 'v2.10.11' || github.events.inputs.dl-cpp-tag-override }}" # BASE_IMAGE_TAG: 'dlcpp-hf2.10.8' # DEV_SUFFIX: '' @@ -24,7 +36,7 @@ jobs: runs-on: ubuntu-22.04 env: - TAG: gha-test + TAG: "gha-test${{ github.event.inputs.test-image-tag-suffix }}" INT_TAG: gha-int-test steps: @@ -48,6 +60,15 @@ jobs: with: driver: docker + - name: Login to GHCR + # This condition should match the `push` condition in the `Build` step just below + if: ${{ github.event.inputs.keep-test-image == 'true' }} + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build id: build uses: docker/build-push-action@v5 @@ -67,7 +88,7 @@ jobs: uses: docker/build-push-action@v5 with: context: ./tests/integration - push: false + push: ${{ github.event.inputs.keep-test-image == 'true' }} load: true build-args: | img_user=${{ env.BASE_IMAGE_USER }} From 7cea1ef41e77679738c799abb43c46846d6918ee Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Thu, 30 Apr 2026 11:21:10 -0700 Subject: [PATCH 3/8] Fixing workflow dispatch inputs --- .github/workflows/publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6a2d1be5..753beba7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,6 +6,7 @@ on: tags: ['*'] pull_request: workflow_dispatch: + inputs: keep-test-image: description: "Keep the Test Image (set to 'true' to keep the image)" required: true From 8cdc5c00c513a0c4239552d1a118fa1995cb59df Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Thu, 30 Apr 2026 13:41:21 -0700 Subject: [PATCH 4/8] Remove cpp tag override option and just change it in the workflow --- .github/workflows/publish.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 753beba7..a2cbbcea 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -15,20 +15,16 @@ on: description: "Suffix for Test Image Tag" required: false default: "" - dl-cpp-tag-override: - description: "Override the dl-cpp version tag" - required: false - default: "" env: REGISTRY: ghcr.io REGISTRY_OLD: docker.io BASE_IMAGE_USER: ghcr.io/driplineorg BASE_IMAGE_REPO: dripline-cpp - DEV_SUFFIX: '-dev' - BASE_IMAGE_TAG: "${{ github.event.inputs.dl-cpp-tag-override == '' && 'v2.10.11' || github.events.inputs.dl-cpp-tag-override }}" -# BASE_IMAGE_TAG: 'dlcpp-hf2.10.8' -# DEV_SUFFIX: '' +# DEV_SUFFIX: '-dev' +# BASE_IMAGE_TAG: 'v2.10.11' + BASE_IMAGE_TAG: 'gha-test-hf2.10.8' + DEV_SUFFIX: '' jobs: From f18bac6b1a80a3f3b036e7d1ebe0ce41f527bb94 Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Thu, 30 Apr 2026 13:43:28 -0700 Subject: [PATCH 5/8] Fixing tag --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a2cbbcea..c05ee33b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -23,7 +23,7 @@ env: BASE_IMAGE_REPO: dripline-cpp # DEV_SUFFIX: '-dev' # BASE_IMAGE_TAG: 'v2.10.11' - BASE_IMAGE_TAG: 'gha-test-hf2.10.8' + BASE_IMAGE_TAG: 'gha-test-hf2.10.12' DEV_SUFFIX: '' jobs: From 5f9f2dddc3999fd5b4e5abe5371fa9a4dcb26a31 Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Thu, 30 Apr 2026 13:49:22 -0700 Subject: [PATCH 6/8] Fixing which image gets pushed --- .github/workflows/publish.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c05ee33b..a3c3c176 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -71,7 +71,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: false + push: ${{ github.event.inputs.keep-test-image == 'true' }} load: true build-args: | img_user=${{ env.BASE_IMAGE_USER }} @@ -85,7 +85,7 @@ jobs: uses: docker/build-push-action@v5 with: context: ./tests/integration - push: ${{ github.event.inputs.keep-test-image == 'true' }} + push: false load: true build-args: | img_user=${{ env.BASE_IMAGE_USER }} From 1ca20597de548286b682015eaa2f083ce22152b6 Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Wed, 26 Aug 2026 12:56:03 -0700 Subject: [PATCH 7/8] [no ci] Updating version and changelog --- CMakeLists.txt | 2 +- changelog.md | 12 ++++++++++++ chart/Chart.yaml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 965bafd4..bbae80e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) # <3.5 is deprecated by CMake -project( DriplinePy VERSION 5.1.5 ) +project( DriplinePy VERSION 5.1.6 ) cmake_policy( SET CMP0074 NEW ) diff --git a/changelog.md b/changelog.md index 48bb1f4a..b082605a 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,18 @@ Types of changes: Added, Changed, Deprecated, Removed, Fixed, Security ## [Unreleased] +## [5.1.6] - 2026-08-26 + +### Fixed + +- `scheduled_log` now performs on_get in tr/except loop to catch dl errors and not crash, instead throwing a warning and returning +- `calibrate` now forces dict calibrations to be mapped to string, reflecting how Scarab reads and passes calibration information + +### Added + +- Added ability to keep the test Docker image + + ## [5.1.5] - 2025-02-04 ### Fixed diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d77ab3d1..67beba62 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 ## the appVersion is used as the container image tag for the main container in the pod from the deployment ## it can be overridden by a values.yaml file in image.tag -appVersion: "v5.1.5" +appVersion: "v5.1.6" description: Deploy a dripline-python microservice name: dripline-python version: 1.1.2 From a2c083e6f69386822ba6f0d01d2b5e143d2538aa Mon Sep 17 00:00:00 2001 From: Noah Oblath Date: Wed, 26 Aug 2026 14:12:47 -0700 Subject: [PATCH 8/8] Updated dl-cpp version used and fixing base image tag in publish.yaml --- .github/workflows/publish.yaml | 8 ++++---- Dockerfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a3c3c176..928601d2 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -21,10 +21,10 @@ env: REGISTRY_OLD: docker.io BASE_IMAGE_USER: ghcr.io/driplineorg BASE_IMAGE_REPO: dripline-cpp -# DEV_SUFFIX: '-dev' -# BASE_IMAGE_TAG: 'v2.10.11' - BASE_IMAGE_TAG: 'gha-test-hf2.10.12' - DEV_SUFFIX: '' + DEV_SUFFIX: '-dev' + BASE_IMAGE_TAG: 'v2.10.12' +# BASE_IMAGE_TAG: 'gha-test-hf2.10.12' +# DEV_SUFFIX: '' jobs: diff --git a/Dockerfile b/Dockerfile index 4411937e..c3185bfb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG img_user=ghcr.io/driplineorg ARG img_repo=dripline-cpp #ARG img_tag=dlcpp-hf2.10.8 -ARG img_tag=v2.10.11 +ARG img_tag=v2.10.12 FROM ${img_user}/${img_repo}:${img_tag} AS deps