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(core): Improve the performance of last 2 sqlite migrations #6522

Merged
merged 18 commits into from
Jul 5, 2023

Conversation

netroy
Copy link
Member

@netroy netroy commented Jun 22, 2023

No description provided.

@github-actions
Copy link
Contributor

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/cli/src/databases/migrations/**:

  • Requested review from at least two engineers on migration.
  • Avoided irreversible data migrations.
  • Avoided deleting or updating data keys.
  • Wrote 'down' migration if possible.

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

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: -0.07 ⚠️

Comparison is base (76aca62) 28.91% compared to head (50c729a) 28.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6522      +/-   ##
==========================================
- Coverage   28.91%   28.85%   -0.07%     
==========================================
  Files        3070     3070              
  Lines      188256   188270      +14     
  Branches    20877    20879       +2     
==========================================
- Hits        54440    54322     -118     
- Misses     132931   133062     +131     
- Partials      885      886       +1     
Impacted Files Coverage Δ
...ckages/cli/src/databases/utils/migrationHelpers.ts 65.21% <85.71%> (+3.67%) ⬆️

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Jun 22, 2023
@krynble krynble force-pushed the PruneAndVacuumBeforeMigration branch from dfee533 to c88cd09 Compare June 26, 2023 13:40
@netroy netroy force-pushed the PruneAndVacuumBeforeMigration branch 3 times, most recently from fd3ff4a to e0f678b Compare July 4, 2023 14:48
@netroy netroy force-pushed the PruneAndVacuumBeforeMigration branch from e0f678b to 915cfb2 Compare July 4, 2023 15:49
@netroy netroy changed the title feat(core): Add support for pruning and vacuuming before individual migrations feat(core): Remove typeorm patches, and improve the performance of sqlite migrations Jul 4, 2023
@netroy netroy marked this pull request as ready for review July 4, 2023 16:52
@netroy

This comment was marked as resolved.

@netroy netroy marked this pull request as draft July 4, 2023 20:25
@netroy netroy changed the title feat(core): Remove typeorm patches, and improve the performance of sqlite migrations feat(core): Improve the performance of sqlite migrations Jul 5, 2023
@netroy netroy marked this pull request as ready for review July 5, 2023 11:00
@netroy netroy requested a review from krynble July 5, 2023 11:01
Copy link
Contributor

@krynble krynble left a comment

Choose a reason for hiding this comment

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

LGTM, just left a comment whether we'd like to remove the console.time. I find ithelpful to stay, so up to you.

return;
}

console.time('pruningData');
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to remove the console.time for production deployment

Copy link
Member Author

Choose a reason for hiding this comment

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

we can do that after the release. I would like to be able to have a bit more visibility for the patch releases.

@cypress
Copy link

cypress bot commented Jul 5, 2023

Passing run #1382 ↗︎

0 228 0 0 Flakiness 0

Details:

🌳 PruneAndVacuumBeforeMigration 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃...
Project: n8n Commit: 50c729abad
Status: Passed Duration: 07:39 💡
Started: Jul 5, 2023 11:32 AM Ended: Jul 5, 2023 11:39 AM

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

✅ All Cypress E2E specs passed

@netroy netroy changed the title feat(core): Improve the performance of sqlite migrations fix(core): Improve the performance of last 2 sqlite migrations Jul 5, 2023
@netroy netroy merged commit 31cba87 into master Jul 5, 2023
@netroy netroy deleted the PruneAndVacuumBeforeMigration branch July 5, 2023 11:46
@janober
Copy link
Member

janober commented Jul 5, 2023

Got released with [email protected]

MiloradFilipovic added a commit that referenced this pull request Jul 6, 2023
* master: (50 commits)
  fix(Google Drive Node): Fix regex in file RLC (#6607)
  feat(HTML Node): 'Convert to table operation (#6540)
  ci: e2e tests don't need to enable saving manual executions
  🚀 Release 1.0.1 (#6606)
  fix(core): Make node execution order configurable, and backward-compatible (#6507)
  🚀 Release 0.236.0 (#6602)
  fix: Fix migrations for postgres and mysql (no-changelog) (#6600)
  fix(core): Improve the performance of last 2 sqlite migrations (#6522)
  refactor: Switch cloud plan retrieval endpoint (no-changelog) (#6529)
  fix(Salesforce Node): Fix typo for adding a contact to a campaign (#6598)
  ci: Hide v1 banner in e2e tests to fix 2-credentials.cy.ts (no-changelog)
  fix(editor): Restore expression completions (#6566)
  refactor: Remove basic auth env vars from docker compose stacks (#6570)
  fix(core): Fix migrations for MySQL/MariaDB (#6591)
  fix(editor): Show retry information in execution list only when it exists (#6587)
  fix(Strapi Node): Fix issue with pagination (#4991)
  fix(core): Route `/rest/workflows/new` correctly (no-changelog) (#6572)
  fix(XML Node): Fix issue with not returning valid data (#6565)
  fix(core): Fix credentials test (#6569)
  fix(core): Ensure valid `logger` is passed to every migration (no-changelog) (#6563)
  ...

# Conflicts:
#	packages/design-system/src/components/N8nCallout/Callout.vue
#	packages/editor-ui/src/App.vue
#	packages/editor-ui/src/plugins/i18n/locales/en.json
#	packages/editor-ui/src/stores/ui.store.ts
MiloradFilipovic added a commit that referenced this pull request Jul 7, 2023
* ADO-814-trial-banner: (58 commits)
  ⚡ Updating permanent dismiss logic to work with all banners
  fix(editor): Make Source control branch select required (#6619)
  ⚡ Minor refactoring of banner logic
  refactor(core): Load `cookieParser` middleware only once (no-changelog) (#6614)
  fix(editor): Prevent keyboard shortcuts to edit workflows in readonly mode (#6613)
  fix(editor): Show appropriate empty workflow list content when instance environment is readonly (#6610)
  ✨ Implemented permanent/temporary dismiss logic for v1 flag
  ci: Fix linting issues (no-changelog)
  fix(Google Drive Node): Fix regex in file RLC (#6607)
  feat(HTML Node): 'Convert to table operation (#6540)
  ci: e2e tests don't need to enable saving manual executions
  🚀 Release 1.0.1 (#6606)
  fix(core): Make node execution order configurable, and backward-compatible (#6507)
  🚀 Release 0.236.0 (#6602)
  fix: Fix migrations for postgres and mysql (no-changelog) (#6600)
  fix(core): Improve the performance of last 2 sqlite migrations (#6522)
  refactor: Switch cloud plan retrieval endpoint (no-changelog) (#6529)
  fix(Salesforce Node): Fix typo for adding a contact to a campaign (#6598)
  ci: Hide v1 banner in e2e tests to fix 2-credentials.cy.ts (no-changelog)
  fix(editor): Restore expression completions (#6566)
  ...
@github-actions github-actions bot mentioned this pull request Jul 12, 2023
@github-actions github-actions bot mentioned this pull request Jul 26, 2023
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.

3 participants