-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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: Prevent undefined issues when restoring binary data #7419
fix: Prevent undefined issues when restoring binary data #7419
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Make sure to check off this list before asking for review. |
@@ -20,7 +20,7 @@ export async function restoreBinaryDataId(run: IRun, executionId: string) { | |||
const { runData } = run.data.resultData; | |||
|
|||
const promises = Object.keys(runData).map(async (nodeName) => { | |||
const binaryDataId = runData[nodeName]?.[0]?.data?.main?.[0]?.[0]?.binary?.data.id; | |||
const binaryDataId = runData[nodeName]?.[0]?.data?.main?.[0]?.[0]?.binary?.data?.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a test here for this bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the note @mutdmour - Ivan did add. Would you like to review?
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7419 +/- ##
=======================================
Coverage 33.50% 33.50%
=======================================
Files 3389 3389
Lines 207020 207020
Branches 22335 22339 +4
=======================================
+ Hits 69360 69366 +6
+ Misses 136539 136533 -6
Partials 1121 1121
☔ View full report in Codecov by Sentry. |
The first test ("itemless case") was originally added [here](https://github.com/n8n-io/n8n/pull/7305/files#diff-7bc4c6fd25a41ea39cef04208c96965f55787e1983e9df748fcd923672959f8bL24) but likely removed on accident.
Passing run #2479 ↗︎
Details:
Review all test suite changes for PR #7419 ↗︎ |
✅ All Cypress E2E specs passed |
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
## [1.11.1](https://github.com/n8n-io/n8n/compare/n8n@1.11.0...n8n@1.11.1) (2023-10-13) ### Bug Fixes * **core:** Do not throw when deleting workflows with executions without binary-data ([#7411](#7411)) ([cde331d](cde331d)) * **core:** Fix ignoring crashed executions without event msgs ([#7368](#7368)) ([ca0d4d2](ca0d4d2)) * **editor:** Fix remote options fetching on every keystroke ([#7320](#7320)) ([15f891b](15f891b)) * Prevent undefined issues when restoring binary data ([#7419](#7419)) ([5da8dcb](5da8dcb)) Co-authored-by: krynble <krynble@users.noreply.github.com>
Got released with |
# [1.12.0](https://github.com/n8n-io/n8n/compare/n8n@1.11.0...n8n@1.12.0) (2023-10-18) ### Bug Fixes * **core:** Add check that queue is defined and remove cyclic dependency ([#7404](#7404)) ([45f2ef3](45f2ef3)) * **core:** Do not throw when deleting workflows with executions without binary-data ([#7411](#7411)) ([2b6a15e](2b6a15e)) * **core:** Fix expression with paired item with multi-input node ([#7424](#7424)) ([ec14141](ec14141)) * **core:** Fix ignoring crashed executions without event msgs ([#7368](#7368)) ([2f4d91b](2f4d91b)) * **core:** Pg-promise de-initialization fix ([#7417](#7417)) ([7703904](7703904)) * **core:** Prevent false stalled jobs in queue mode from displaying as errored ([#7435](#7435)) ([e01b9e5](e01b9e5)) * **core:** Prevent undefined issues when restoring binary data ([#7419](#7419)) ([46977a2](46977a2)) * **editor:** Fix remote options fetching on every keystroke ([#7320](#7320)) ([367255a](367255a)) * **editor:** Open only one tab with plans page ([#7377](#7377)) ([c599006](c599006)) * **Google Sheets Node:** Update by row_number, restored 'Handling Extra Data Option', updated Cell Format default ([#7357](#7357)) ([d8531a5](d8531a5)) * **Ldap Node:** Fix issue with connections not closing correctly ([#7432](#7432)) ([c3f0be8](c3f0be8)) * **Set Node:** Null should not throw an error ([#7416](#7416)) ([e9b6ab0](e9b6ab0)) * **TheHive 5 Node:** Observable encoding in alert > create fix ([#7450](#7450)) ([a2d2e3d](a2d2e3d)) ### Features * **core:** Make executions pruning interval configurable ([#7439](#7439)) ([40707fa](40707fa)) * **Google Calendar Trigger Node:** Add support for cancelled events ([#7436](#7436)) ([9d241a0](9d241a0)) * **HubSpot Trigger Node:** Add support for ticket related events ([#7156](#7156)) ([57c6093](57c6093)) * **n8n Form Trigger Node:** New node ([#7130](#7130)) ([3ddc176](3ddc176)) * **Spreadsheet File Node:** Improve CSV parsing ([#7448](#7448)) ([79f23fb](79f23fb)) Co-authored-by: netroy <netroy@users.noreply.github.com>
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
# [1.12.0](https://github.com/n8n-io/n8n/compare/n8n@1.11.0...n8n@1.12.0) (2023-10-18) ### Bug Fixes * **core:** Add check that queue is defined and remove cyclic dependency ([#7404](#7404)) ([45f2ef3](45f2ef3)) * **core:** Do not throw when deleting workflows with executions without binary-data ([#7411](#7411)) ([2b6a15e](2b6a15e)) * **core:** Fix expression with paired item with multi-input node ([#7424](#7424)) ([ec14141](ec14141)) * **core:** Fix ignoring crashed executions without event msgs ([#7368](#7368)) ([2f4d91b](2f4d91b)) * **core:** Pg-promise de-initialization fix ([#7417](#7417)) ([7703904](7703904)) * **core:** Prevent false stalled jobs in queue mode from displaying as errored ([#7435](#7435)) ([e01b9e5](e01b9e5)) * **core:** Prevent undefined issues when restoring binary data ([#7419](#7419)) ([46977a2](46977a2)) * **editor:** Fix remote options fetching on every keystroke ([#7320](#7320)) ([367255a](367255a)) * **editor:** Open only one tab with plans page ([#7377](#7377)) ([c599006](c599006)) * **Google Sheets Node:** Update by row_number, restored 'Handling Extra Data Option', updated Cell Format default ([#7357](#7357)) ([d8531a5](d8531a5)) * **Ldap Node:** Fix issue with connections not closing correctly ([#7432](#7432)) ([c3f0be8](c3f0be8)) * **Set Node:** Null should not throw an error ([#7416](#7416)) ([e9b6ab0](e9b6ab0)) * **TheHive 5 Node:** Observable encoding in alert > create fix ([#7450](#7450)) ([a2d2e3d](a2d2e3d)) ### Features * **core:** Make executions pruning interval configurable ([#7439](#7439)) ([40707fa](40707fa)) * **Google Calendar Trigger Node:** Add support for cancelled events ([#7436](#7436)) ([9d241a0](9d241a0)) * **HubSpot Trigger Node:** Add support for ticket related events ([#7156](#7156)) ([57c6093](57c6093)) * **n8n Form Trigger Node:** New node ([#7130](#7130)) ([3ddc176](3ddc176)) * **Spreadsheet File Node:** Improve CSV parsing ([#7448](#7448)) ([79f23fb](79f23fb)) Co-authored-by: netroy <netroy@users.noreply.github.com>
Github issue / Community forum post (link here to close automatically):