fix(Oracle DB Node): Handle the test failures#28341
fix(Oracle DB Node): Handle the test failures#28341sudarshan12s wants to merge 2 commits inton8n-io:masterfrom
Conversation
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant Node as Oracle Node Execution
participant Runner as configureQueryRunner
participant DB as Oracle DB (oracledb)
participant Utils as _getResponseForOutbinds
participant Helpers as n8n Workflow Helpers
Node->>Runner: execute(queries, parameters)
Runner->>DB: getConnection()
DB-->>Runner: connection object
alt Operation: Insert/Update with Outbinds
Runner->>DB: executeMany(sql, values, options)
DB-->>Runner: result (including outBinds)
Runner->>Utils: CHANGED: _getResponseForOutbinds(outBinds, returnData)
loop For each row in normalizedRows
Utils->>Helpers: wrapData(row)
Utils->>Helpers: constructExecutionMetaData(wrappedRow)
Helpers-->>Utils: executionData (Array)
alt NEW: Mutation via Loop (Avoids Stack Overflow)
loop For each entry in executionData
Utils->>Utils: returnData.push(entry)
end
end
end
Note over Utils,Runner: returnData reference updated
else Operation: Select
Runner->>DB: execute(sql, parameters)
DB-->>Runner: result (rows)
Runner->>Helpers: constructExecutionMetaData(rows)
Helpers-->>Runner: executionData
Runner->>Runner: Accumulate results
end
Runner->>DB: connection.close()
Runner-->>Node: return aggregated data (returnData)
|
Hey @sudarshan12s, Thank you for your contribution. We appreciate the time and effort you’ve taken to submit this pull request. Before we can proceed, please ensure the following: Regarding new nodes: If your node integrates with an AI service that you own or represent, please email nodes@n8n.io and we will be happy to discuss the best approach. About review timelines: Thank you again for contributing to n8n. |
Summary
As part of fix for issue, the tests were failing because of some minor issue where the
returnDatais not returned in function_getResponseForOutbinds.Thanks @MDub3y for the earlier fixes. I made a minor change on top of this to fix the outbind tests. Can you take a look..
tests run using:
Modified _getResponseForOutbinds to mutate the
returnDatawith a for…of push; this keeps the max-argument fix (no spread) while preserving the original reference soconfigureQueryRunnersees the out-bind rows.• file: packages/nodes-base/nodes/Oracle/Sql/helpers/utils.tsAdded the out-bind regression test: it now fakes a single out-bind row that expands to 250 k result items, reproducing the call-stack overflow. Also added a test for the SELECT path. It mocks the driver returning 250 k rows to ensure the success-path aggregation.
• file: packages/nodes-base/nodes/Oracle/Sql/test/utils.test.tsRelated Linear tickets, Github issues, and Community forum posts
#26985
bd5a702
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)