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): Restore old names for pruning config keys #11782

Merged
merged 6 commits into from
Nov 20, 2024

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Nov 19, 2024

Summary

#11507 renamed the poorly named pruning config keys in the schema object, but it turns out the internal structure of the schema object is being relied on externally via N8N_CONFIG_FILES, so this PR renames back those keys until we can deprecate and drop this env var in v2.

Related Linear tickets, Github issues, and Community forum posts

8gears/n8n-helm-chart#125

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/@n8n/config/src/index.ts 66.66% 0 Missing and 1 partial ⚠️
...src/databases/repositories/execution.repository.ts 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

If I have a config.json file like this:

{
	"executions": {
		"pruneData": true,
		"pruneDataMaxAge": 30,
		"pruneDataMaxCount": 100
	}
}

and I start n8n with N8N_CONFIG_FILES=config.json pn start it works on 1.66.0 but not with latest master or this branch. The pruning config needs to be under executions. Also could we add tests for this so it doesn't break a seconds time?

@ivov
Copy link
Contributor Author

ivov commented Nov 20, 2024

under executions

Good catch! Fixed

tests for this

Let's add tests for this separately for all remaining schema keys? As it's a more general issue and we should include this PR in today's release.

@tomi
Copy link
Contributor

tomi commented Nov 20, 2024

under executions

Good catch! Fixed

tests for this

Let's add tests for this separately for all remaining schema keys? As it's a more general issue and we should include this PR in today's release.

Fair enough. Ideally we should include a test for the case that broke in the first place. But we can merge this to get it on the release. Should add the tests after this so we don't forget

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.

🚀

@tomi tomi added the release/backport Changes that need to be backported to older releases. label Nov 20, 2024
@ivov
Copy link
Contributor Author

ivov commented Nov 20, 2024

Copy link

cypress bot commented Nov 20, 2024

n8n    Run #7994

Run Properties:  status check passed Passed #7994  •  git commit 82aa71dbc3: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Project n8n
Branch Review restore-old-names-for-pruning-config-keys
Run status status check passed Passed #7994
Run duration 04m 37s
Commit git commit 82aa71dbc3: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Committer Iván Ovejero
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 475
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@ivov ivov merged commit d15b8d0 into master Nov 20, 2024
39 of 40 checks passed
@ivov ivov deleted the restore-old-names-for-pruning-config-keys branch November 20, 2024 08:56
@github-actions github-actions bot mentioned this pull request Nov 20, 2024
@janober
Copy link
Member

janober commented Nov 20, 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
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team release/backport Changes that need to be backported to older releases. Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants