Skip to content

fix(Oracle DB Node): Handle the test failures#28341

Open
sudarshan12s wants to merge 2 commits inton8n-io:masterfrom
sudarshan12s:fixoutbinds
Open

fix(Oracle DB Node): Handle the test failures#28341
sudarshan12s wants to merge 2 commits inton8n-io:masterfrom
sudarshan12s:fixoutbinds

Conversation

@sudarshan12s
Copy link
Copy Markdown
Contributor

@sudarshan12s sudarshan12s commented Apr 10, 2026

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:


cd $WORK/packages/nodes-base/nodes/Oracle/Sql/test
export ORACLE_USER=DEMO
export ORACLE_PASSWORD=demo
export ORACLE_CONNECTSTRING=localhost:1521/freepdb1
export ORACLE_INTEG_TESTS=1
npx jest $WORK/packages/nodes-base/nodes/Oracle/Sql/test/*

Modified _getResponseForOutbinds to mutate the returnData with a for…of push; this keeps the max-argument fix (no spread) while preserving the original reference so configureQueryRunner sees the out-bind rows.
• file: packages/nodes-base/nodes/Oracle/Sql/helpers/utils.ts

Added 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.ts

Related Linear tickets, Github issues, and Community forum posts

#26985
bd5a702

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

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)
Loading

@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request in linear DEPRECATED labels Apr 10, 2026
@n8n-assistant
Copy link
Copy Markdown
Contributor

n8n-assistant bot commented Apr 10, 2026

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:
• Tests are included for any new functionality, logic changes or bug fixes.
• The PR aligns with our contribution guidelines.

Regarding new nodes:
We no longer accept new nodes directly into the core codebase. Instead, we encourage contributors to follow our Community Node Submission Guide to publish nodes independently.

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:
This PR has been added to our internal tracker as "GHC-7682". While we plan to review it, we are currently unable to provide an exact timeframe. Our goal is to begin reviews within a month, but this may change depending on team priorities. We will reach out when the review begins.

Thank you again for contributing to n8n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Authored by a community member in linear DEPRECATED node/improvement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant