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

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

jmle
Copy link
Contributor

@jmle jmle commented Nov 14, 2024

See #718

@jmle jmle requested a review from shawn-hurley November 14, 2024 17:10
rule-example.yaml Show resolved Hide resolved
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

Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
@jmle jmle force-pushed the fix-chaining-java branch from bbbaee8 to 86e301e Compare November 18, 2024 10:32
@jmle jmle merged commit 5811cce into konveyor:main Nov 18, 2024
7 of 9 checks passed
jmle added a commit to jmle/analyzer-lsp that referenced this pull request Nov 19, 2024
jmle added a commit to jmle/analyzer-lsp that referenced this pull request Nov 19, 2024
jmle added a commit to jmle/analyzer-lsp that referenced this pull request Nov 19, 2024
jmle added a commit that referenced this pull request Nov 20, 2024
See #718

Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
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