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

🐛 Fix chaining in Java provider #721

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jmle
Copy link
Contributor

@jmle jmle commented Nov 14, 2024

See #718

Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
rule-example.yaml Show resolved Hide resolved
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
This reverts commit cb8dbf8.
Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for adding this!

@@ -611,7 +611,7 @@ func templateCondition(condition []byte, ctx map[string]engine.ChainTemplate) ([
s := strings.ReplaceAll(string(condition), `'{{`, "{{")
s = strings.ReplaceAll(s, `}}'`, "}}")

s, err := mustache.Render(s, true, ctx)
s, err := mustache.RenderRaw(s, true, ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why render raw vs render just for my knowledge :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were calling the Render method passing true as a second parameter, but the signature of Render doesn´t have a bool parameter. RenderRaw has, and I thought there was some reason in the past to use RenderRaw but the invocation was done mistakenly by calling Render instead...

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! that makes sense

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