Skip to content

[CDAP-21270] fix: restore JEXL allowlist explanation in error message - #1059

Merged
sahusanket merged 1 commit into
developfrom
fix/jexl-error-message
Sep 29, 2026
Merged

sahusanket merged 1 commit into
developfrom
fix/jexl-error-message

Conversation

@sahusanket

Copy link
Copy Markdown
Contributor

Restores the explanatory sentence Make sure the JEXL transformation is valid and uses only allowlisted classes, methods, and properties. to the JEXL evaluation error message in EL.handleJexlException (follow-up to #1055).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the JEXL evaluation error message in EL.java to suggest checking if the transformation is valid and uses only allowlisted classes, methods, and properties, and adds a corresponding assertion in RecipePipelineExecutorTest.java. Feedback suggests conditionally appending the allowlist mention only when allowlistEnabled is true to prevent misleading users when the allowlist is disabled.

Comment thread wrangler-core/src/main/java/io/cdap/wrangler/expression/EL.java
@riyaa14
riyaa14 self-requested a review September 29, 2026 06:48

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we split the base message like I was doing before?

Here we can add "Make sure JEXL transformation is valid."

and above, we can add: "Make sure JEXL transformation uses only allowlisted classes, methods and properties."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here, we can throw this message:

baseErrorMessage + "Make sure JEXL transformation uses only allowlisted classes, methods and properties."

@sahusanket
sahusanket force-pushed the fix/jexl-error-message branch from 2ae4737 to 0251423 Compare September 29, 2026 07:02
@sahusanket
sahusanket merged commit 353167e into develop Sep 29, 2026
11 checks passed
@sahusanket
sahusanket deleted the fix/jexl-error-message branch September 29, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Triggers unit test build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants