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

refactor(core): Warn on sqlite DB detected during init on queue mode #8034

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Dec 15, 2023

When setting up queue mode, it is easy to overlook that not exporting Postgres env vars will default the worker to use sqlite, which will fail during execution with a non-obvious error. Hence add warnings when starting a worker with an incompatible DB type.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Dec 15, 2023
Copy link
Contributor

@tomi tomi left a comment

Choose a reason for hiding this comment

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

👏 👏 👏 Nice! We should definitely have more sanity checks like this. If it's not compatible, should we log an error and just exit the process? It will probably not work anyways, right?

Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

Should we move this to BaseCommand instead ?

@ivov ivov changed the title refactor(core): Warn on non-Postgres DB during worker init on queue mode refactor(core): Exit on sqlite DB detected during init on queue mode Dec 15, 2023
@krynble
Copy link
Contributor

krynble commented Dec 15, 2023

👏 👏 👏 Nice! We should definitely have more sanity checks like this. If it's not compatible, should we log an error and just exit the process? It will probably not work anyways, right?

I usually run sqlite locally for testing and it works, it's worth haviing a warning and adding it to BaseCommand makes sense as suggested by Adi, but I wouldn't prevent n8n from starting.

@ivov ivov changed the title refactor(core): Exit on sqlite DB detected during init on queue mode refactor(core): Warn on sqlite DB detected during init on queue mode Dec 15, 2023
Copy link

cypress bot commented Dec 15, 2023

1 flaky test on run #3349 ↗︎

0 305 5 0 Flakiness 1

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Project: n8n Commit: 6b7cd6e4bd
Status: Passed Duration: 06:35 💡
Started: Dec 15, 2023 9:45 AM Ended: Dec 15, 2023 9:51 AM
Flakiness  cypress/e2e/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 Screenshots Video

Review all test suite changes for PR #8034 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@ivov ivov merged commit f18bc5f into master Dec 15, 2023
20 checks passed
@ivov ivov deleted the warn-non-postgres-worker-init branch December 15, 2023 09:56
MiloradFilipovic added a commit that referenced this pull request Dec 15, 2023
* master:
  refactor(core): Warn on sqlite DB detected during init on queue mode (#8034)
  docs: Two small UI copy fixes in sub-nodes (#8032)
  fix(core): Restore workflow ID during execution creation (#8031)
  fix(core): Initialize queue once in queue mode (#8025)
  fix(editor): Add back credential `use` permission (#8023)
  fix(editor): Disable auto scroll and list size check when clicking on executions (#7983)
  fix(editor): Fix dialogVisibleChanged hooks event when meta.value is undefined (no-changelog) (#7986)
  perf(editor): Improve canvas rendering performance (#8022)
@janober
Copy link
Member

janober commented Dec 21, 2023

Got released with n8n@1.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants