Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Deploy That Broke Running Jobs: Changing an n8n Workflow While Executions Are In Flight

This is part of my build-in-public series on running LLM workflows in n8n in production. Everything here is from real templates I sell and support — the mistakes are mine, the fixes are tested. The change was small. The queue was not empty. I once edited a live workflow in the middle of the day. The change was small: one extra field on an outgoing message, one renamed step. I saved, reactivated,…

When running LLM workflows in n8n in production, changing a workflow while executions are in flight can be challenging. The key rule is to snapshot the current version before making any changes. This involves exporting the current version with a date and a one-line note about its function. Rollback becomes a simple reactivation of the old export, rather than a reconstruction effort.

Before deploying, it's crucial to drain the system. This means stopping new work from entering the workflow to avoid mixed old and new runs. Pause the trigger or deactivate the workflow to allow all in-flight executions to finish. Check the execution list for any jobs stuck in places like the dead-letter queue or review queue. Only after confirming zero in-flight executions should you then change the workflow.

After deploying, run a canary job through the new version first. This job should be a full end-to-end job with harmless payload. The canary helps catch issues like renamed fields or steps that only matter with a full payload. If the canary's output matches the expected result, only then re-enable the trigger. If the canary fails, rollback using the snapshot from earlier. Remember, rollback only restores the workflow definition and does not undo the side effects produced by the new version.

A rollback plan should include reactivating the old version and listing the jobs that ran on the new version so their outputs can be checked manually. This ensures that side effects from the new version are not double-applied when the workflow is rolled back. This process, while requiring extra steps, has saved the author from the pitfalls of mixed-version runs, making workflow deploys safer and more predictable.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

AfterHours — Some Signals Should Never Be Heard.

AfterHours — Some Signals Should Never Be Heard. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built AfterHours is an AI-powered haunted…

  • AI-powered haunted radio game simulates mysterious broadcasts
  • Players investigate fictional town of Blackwood in 1988
  • AI-generated atmospheric content adds unpredictability

More from Saturday 31 October →