Skip to content

Fixing entity bugs#224

Open
wcpettus wants to merge 1 commit intodevelopfrom
feature/entity_fixes
Open

Fixing entity bugs#224
wcpettus wants to merge 1 commit intodevelopfrom
feature/entity_fixes

Conversation

@wcpettus
Copy link
Contributor

@wcpettus wcpettus commented Mar 6, 2026

Fixes

  • scheduled_log now performs on_get in try/except loop to catch dripline 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

Testing

  • tested with a few example services to ensure it works at small scale

Prior to merging for releases:

  • update the project's version in the top-level CMakeLists.txt file
  • update the appVersion to be the new container image tag version in chart/Chart.yaml

…ons to map by string matching scarab readin pattern
@wcpettus wcpettus requested a review from nsoblath March 6, 2026 23:19
logger.debug(f"in a scheduled log event for {self.name}")
try:
result = self.on_get()
except ThrowReply as err:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels overly broad --- all thrown exceptions are turned into warnings in the log file. There's no way to have an actual error that results in an error reply. And no information about the failure is passed back to the user.

Do we perhaps want to consider something where the on_get() function returns an optional warning/error message? This could be passed back to the user in the reply message, perhaps using a warning return code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in the scheduled_log method, so by construction nothing can be passed as a reply because there is neither user initiator nor reply. This action is happening according to the scheduler (should only route through https://github.com/driplineorg/dripline-python/blob/develop/dripline/core/entity.py#L223). That was my logic for putting a very broad catch here.

I thought it better to handle it here so that the service continues running, guaranteed. Rather than messing with the on_get() method, where we could worry about intercepting what gets returned in the user reply (for example, users with dl_agent or queries that are part of a cmd would not be passing through this part of the code).

But maybe I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants