Skip to content

feat(core): Make detaching floatable entitlements on shutdown configurable #14266

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

Merged
merged 11 commits into from
Apr 4, 2025

Conversation

csuermann
Copy link
Contributor

@csuermann csuermann commented Mar 29, 2025

Summary

  • By default, floating entitlements are released back to the pool when an n8n instance shuts down gracefully, allowing other instances to use them. However, in some cases, this behavior may be undesirable. This PR introduces a new environment variable, N8N_LICENSE_DETACH_FLOATING_ON_SHUTDOWN, which can be set to false to prevent entitlements from being detached. Note that the license:clear command will still attempt to detach them.
  • Utilizes the license SDK's logic for removing the license certificate from the database when running the license:clear command.
  • Removes the N8N_LICENSE_AUTO_RENEW_OFFSET environment variable, replacing it with a fixed renewal offset of 72 hours.

Related Linear tickets, Github issues, and Community forum posts

Closes https://linear.app/n8n/issue/CAT-727

Review / Merge checklist

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Mar 29, 2025
@csuermann csuermann marked this pull request as ready for review April 4, 2025 09:39
@csuermann csuermann requested a review from ivov April 4, 2025 09:39
MarcL
MarcL previously approved these changes Apr 4, 2025
Copy link
Contributor

@MarcL MarcL left a comment

Choose a reason for hiding this comment

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

👍🏻

Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

CI is failing due to typecheck

@ivov
Copy link
Contributor

ivov commented Apr 4, 2025

Removes the N8N_LICENSE_AUTO_RENEW_OFFSET environment variable, replacing it with a fixed renewal offset of 72 hours.

Is this a breaking change? Can users be relying on a shorter or longer offset and have issues?

Copy link

cypress bot commented Apr 4, 2025

n8n    Run #10097

Run Properties:  status check passed Passed #10097  •  git commit 5c9b100d83: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 csuermann 🗃️ e2e/*
Project n8n
Branch Review license-sdk-2_19_0
Run status status check passed Passed #10097
Run duration 03m 53s
Commit git commit 5c9b100d83: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 csuermann 🗃️ e2e/*
Committer Cornelius Suermann
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 5
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

github-actions bot commented Apr 4, 2025

✅ All Cypress E2E specs passed

@csuermann
Copy link
Contributor Author

Removes the N8N_LICENSE_AUTO_RENEW_OFFSET environment variable, replacing it with a fixed renewal offset of 72 hours.

Is this a breaking change? Can users be relying on a shorter or longer offset and have issues?

Technically, yes — this is a breaking change, since users will no longer be able to configure the renewal offset themselves. However, in practice, there was never a strong reason to make this setting configurable in the first place. The default has always been 72 hours, and it's unlikely that many users have changed it. So while it is a breaking change in theory, I don't believe it should be classified or communicated as such in this case.

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/license.ts 66.66% 2 Missing ⚠️
packages/cli/src/commands/license/clear.ts 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

github-actions bot commented Apr 4, 2025

✅ All Cypress E2E specs passed

@csuermann csuermann merged commit c9565fc into master Apr 4, 2025
36 checks passed
@csuermann csuermann deleted the license-sdk-2_19_0 branch April 4, 2025 15:35
guillaumejacquart pushed a commit that referenced this pull request Apr 4, 2025
…rable (#14266)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
@github-actions github-actions bot mentioned this pull request Apr 7, 2025
@janober
Copy link
Member

janober commented Apr 7, 2025

Got released with n8n@1.87.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.

4 participants