Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function condition_if will compare int and string #361

Open
wenfengwang opened this issue Dec 24, 2022 · 0 comments
Open

function condition_if will compare int and string #361

wenfengwang opened this issue Dec 24, 2022 · 0 comments
Assignees
Labels
bug Something isn't working discussion it's needed to discussion enhancement New feature or request

Comments

@wenfengwang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. create a subscription
vsctl subscription create \
    --eventbus test \
    --sink "http://sink-display:8080" \
    --transformer '{
        "pipeline": [
            {"command":["condition_if","$.data.color", "$.data.test", ">", "bug", "a", "b"]}
        ]
  1. send an event
vsctl event put test --source test --type test \
  --data '{
  "test": 120
}'

2. What did you expect to see? (Required)

no warn log

3. What did you see instead (Required)

...
time="2022-12-24T11:33:24Z" level=warning msg="action execute error" command=CONDITION_IF error="cannot cast from String to Float: strconv.ParseFloat: parsing \"bug\": invalid syntax"

4. What is your Vanus version? (Required)

v0.5.3

@wenfengwang wenfengwang added bug Something isn't working enhancement New feature or request discussion it's needed to discussion labels Dec 24, 2022
@xdlbdy xdlbdy changed the title function condition_id will compare int and string function condition_if will compare int and string Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion it's needed to discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants