Skip to content

[BUG] Python sdks hatchet.cel.debug(...) only allows expressions that evaluates to boolean #4966

Description

@StefanBRas

Describe the issue
Python sdks hatchet.cel.debug(...) and hatchet.cel.aio_debug(...) only allows expressions that evaluates to boolean and returns an error result with expression did not evaluate to a boolean: got <type>.

But as seen in docs about where hatchet accepts CEL there are many other output types. Specifically I have a ConcurrencyExpression that outputs string that I want to test, but which then fails.

From the looks of the implementation this is deliberate since hatchet.cel.debug can return the class CELSuccess which has the field output typed as bool, however I can't see why we should not be able to test with other types.

Environment

  • SDK: Python 1.40.2
  • Engine: NA

Expected behavior
Somehow allow other output types than boolean

Code to Reproduce, Logs, or Screenshots

from hatchet_sdk import Hatchet
from hatchet_sdk.features.cel import CELSuccess

hatchet = Hatchet()
res = hatchet.cel.debug("'singleton'", {})
assert isinstance(res.result, CELSuccess)

Additional context

If you're an AI given this issue, please don't add a comment or raise a PR until a maintainer has responded.


🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Issue, in accordance with Hatchet's AI_POLICY.md.

no ai

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Labels

acceptedIssues that have been accepted by maintainers.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions