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(FTP Node): Fix issue with connections not closing properly #8619

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

Joffcom
Copy link
Member

@Joffcom Joffcom commented Feb 13, 2024

Summary

We were failing to close FTP / SFTP connections on node errors and credential tests.

Related tickets and issues

https://community.n8n.io/t/sftp-ftp-node-doesnt-close-connection/32581

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Feb 13, 2024
Copy link

cypress bot commented Feb 13, 2024

3 flaky tests on run #4087 ↗︎

0 343 5 0 Flakiness 3

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 Joffcom 🗃️ e2e/*
Project: n8n Commit: 4e2fa0f6e9
Status: Passed Duration: 03:40 💡
Started: Feb 13, 2024 1:18 PM Ended: Feb 13, 2024 1:22 PM
Flakiness  5-ndv.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Test Replay Screenshots Video
Flakiness  24-ndv-paired-item.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > resolves expression with default item when input node is not parent, while still pairing items Test Replay Screenshots Video
Flakiness  38-custom-template-repository.cy.ts • 1 flaky test

View Output Video

Test Artifacts
In-app templates repository > should save template id with the workflow Test Replay Screenshots Video

Review all test suite changes for PR #8619 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@Joffcom Joffcom merged commit e597fbc into master Feb 13, 2024
28 checks passed
@Joffcom Joffcom deleted the c/32581 branch February 13, 2024 14:32
Comment on lines 450 to +457
} catch (error) {
await ftp.end();
return {
status: 'Error',
message: error.message,
};
}
await ftp.end();
Copy link
Member

Choose a reason for hiding this comment

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

This is a perfect case for finally:

				} catch (error) {
					return {
						status: 'Error',
						message: error.message,
					};
				} finally {
					await ftp.end();
				}

@janober
Copy link
Member

janober commented Feb 15, 2024

Got released with [email protected]

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/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants