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(Postgres Node): Connection pool of the database object has been destroyed #7074

Merged

Conversation

@michael-radency michael-radency added n8n team Authored by the n8n team node/issue Issue with a node labels Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching packages/nodes-base/nodes/**:

  • Added workflow tests for nodes if possible.

Make sure to check off this list before asking for review.

@@ -161,15 +161,28 @@ export async function execute(
db: PgpDatabase,
): Promise<INodeExecutionData[]> {
items = replaceEmptyStringsByNulls(items, nodeOptions.replaceEmptyStrings as boolean);
const nodeVersion = nodeOptions.typeVersion as number;
Copy link
Member

Choose a reason for hiding this comment

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

This code seems to be duplicated a few times. Is there anything we can reduce this code duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added helper to remove duplication

Joffcom
Joffcom previously approved these changes Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@cypress
Copy link

cypress bot commented Sep 1, 2023

Passing run #2064 ↗︎

0 238 0 0 Flakiness 0

Details:

🌳 node-728-postgres-connection-pool-of-the-database-fix 🖥️ browsers:node18.12....
Project: n8n Commit: 0d0545f7de
Status: Passed Duration: 07:52 💡
Started: Sep 1, 2023 7:10 PM Ended: Sep 1, 2023 7:18 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch coverage: 70.73% and no project coverage change.

Comparison is base (008cdcc) 32.10% compared to head (0d0545f) 32.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7074   +/-   ##
=======================================
  Coverage   32.10%   32.10%           
=======================================
  Files        3188     3188           
  Lines      195871   195892   +21     
  Branches    21355    21356    +1     
=======================================
+ Hits        62878    62898   +20     
  Misses     131961   131961           
- Partials     1032     1033    +1     
Files Changed Coverage Δ
...ges/nodes-base/nodes/Postgres/v2/actions/router.ts 0.00% <0.00%> (ø)
...nodes-base/nodes/Postgres/v2/methods/listSearch.ts 0.00% <0.00%> (ø)
...odes-base/nodes/Postgres/v2/methods/loadOptions.ts 0.00% <0.00%> (ø)
...-base/nodes/Postgres/v2/methods/resourceMapping.ts 0.00% <0.00%> (ø)
...ages/nodes-base/nodes/Postgres/v2/helpers/utils.ts 58.50% <55.55%> (-0.14%) ⬇️
...s/Postgres/v2/actions/database/insert.operation.ts 84.21% <100.00%> (+1.85%) ⬆️
...s/Postgres/v2/actions/database/update.operation.ts 65.82% <100.00%> (+1.82%) ⬆️
...s/Postgres/v2/actions/database/upsert.operation.ts 84.21% <100.00%> (+1.19%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

✅ All Cypress E2E specs passed

@michael-radency michael-radency merged commit 9dd5f0e into master Sep 1, 2023
18 checks passed
@michael-radency michael-radency deleted the node-728-postgres-connection-pool-of-the-database-fix branch September 1, 2023 19:19
@github-actions github-actions bot mentioned this pull request Sep 6, 2023
netroy added a commit that referenced this pull request Sep 6, 2023
# [1.6.0](https://github.com/n8n-io/n8n/compare/n8n@1.5.1...n8n@1.6.0)
(2023-09-06)


### Bug Fixes

* **core:** Add support for in-transit encryption (TLS) on Redis
connections ([#7047](#7047))
([a910757](a910757))
* **core:** Disallow orphan executions
([#7069](#7069))
([8a28e98](8a28e98))
* **core:** Split event bus controller into community and ee
([#7107](#7107))
([011ee2e](011ee2e))
* **editor:** Standardize save text
([#7093](#7093))
([58b3492](58b3492))
* Ensure all new executions are saved
([#7061](#7061))
([b8e06d2](b8e06d2))
* Load remote resources even if expressions in non requried parameters
resolve ([#6987](#6987))
([8a8d4e8](8a8d4e8))
* **Postgres Node:** Connection pool of the database object has been
destroyed ([#7074](#7074))
([9dd5f0e](9dd5f0e))
* **Postgres Node:** Tunnel doesn't always close
([#7087](#7087))
([58e55ba](58e55ba))


### Features

* **core:** Add list query middleware to credentials
([#7041](#7041))
([fd78021](fd78021))
* **core:** Add support for floating licenses
([#7090](#7090))
([e26553f](e26553f))
* **core:** Migration for soft deletions for executions
([#7088](#7088))
([413e0bc](413e0bc))
* **HTTP Request Node:** Determine binary file name from
content-disposition headers
([#7032](#7032))
([273d091](273d091))
* **TheHive Node:** Overhaul
([#6457](#6457))
([73e782e](73e782e))

Co-authored-by: netroy <netroy@users.noreply.github.com>
@janober
Copy link
Member

janober commented Sep 6, 2023

Got released with n8n@1.6.0

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 node/issue Issue with a node Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants