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(core): Opt-out from optimizations if $item is used #12036

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

tomi
Copy link
Contributor

@tomi tomi commented Dec 4, 2024

Summary

$item is legacy syntax in the Code Node and should not be used. We still need to support it. Opt-out from any optimizations in this case so we have correct data available.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CAT-396/referenced-node-is-unexecuted-[item-0]-error

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

🙏🏻

@@ -17,7 +17,7 @@ describe('BuiltInsParser', () => {
const parseAndExpectOk = (code: string) => {
const result = parser.parseUsedBuiltIns(code);
if (!result.ok) {
fail(result.error);
throw result.error;
Copy link
Contributor

Choose a reason for hiding this comment

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

Now parseAndExpectOk should be parseAndThrowOnError or parseOrThrow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it because fail was not defined in jest runtime. The semantics are the same, it expects that that parsing succeeds. Now it just throws directly instead of using a function to throw

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@tomi tomi merged commit 872535a into master Dec 4, 2024
32 of 35 checks passed
@tomi tomi deleted the cat-396-referenced-node-is-unexecuted-item-0-error branch December 4, 2024 12:32
@github-actions github-actions bot mentioned this pull request Dec 4, 2024
@janober
Copy link
Member

janober commented Dec 4, 2024

Got released with [email protected]

@tomi tomi added the release/backport Changes that need to be backported to older releases. label Dec 4, 2024
@github-actions github-actions bot mentioned this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team release/backport Changes that need to be backported to older releases. Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants