Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@ on:
tags: ['*']
pull_request:
workflow_dispatch:
inputs:
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: ""

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: 'v2.10.11'
# BASE_IMAGE_TAG: 'dlcpp-hf2.10.8'
BASE_IMAGE_TAG: 'v2.10.12'
# BASE_IMAGE_TAG: 'gha-test-hf2.10.12'
# DEV_SUFFIX: ''

jobs:
Expand All @@ -24,7 +33,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:
Expand All @@ -48,12 +57,21 @@ 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
with:
context: .
push: false
push: ${{ github.event.inputs.keep-test-image == 'true' }}
load: true
build-args: |
img_user=${{ env.BASE_IMAGE_USER }}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 )

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions dripline/core/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions dripline/core/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading