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

feat(core): Use node IDs instead of names for data mocking during test runs (no-changelog) #12348

Conversation

burivuhster
Copy link
Contributor

Summary

As node names in workflows can be changed over time, relying on node names for data mocking in workflow evaluation is very fragile.
This PR addresses this issue by storing IDs of the nodes to be mocked. Test runner now resolves node data in past executions using IDs instead of names.

Related Linear tickets, Github issues, and Community forum posts

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 Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

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

Files with missing lines Patch % Lines
...li/src/evaluation.ee/test-definition.service.ee.ts 71.42% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@burivuhster burivuhster marked this pull request as ready for review December 24, 2024 11:12
OlegIvaniv
OlegIvaniv previously approved these changes Jan 3, 2025
…inning-in-test-runner

# Conflicts:
#	packages/cli/src/evaluation.ee/test-runner/__tests__/mock-data/workflow.under-test-renamed-nodes.json
Copy link
Contributor

github-actions bot commented Jan 6, 2025

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Jan 6, 2025

n8n    Run #8595

Run Properties:  status check passed Passed #8595  •  git commit 8f5c3e573d: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 burivuhster 🗃️ e2e/*
Project n8n
Branch Review ai-500-use-node-ids-instead-of-names-for-pinning-in-test-runner
Run status status check passed Passed #8595
Run duration 04m 55s
Commit git commit 8f5c3e573d: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 burivuhster 🗃️ e2e/*
Committer Eugene Molodkin
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
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 485
View all changes introduced in this branch ↗︎

@burivuhster burivuhster merged commit 04c1182 into master Jan 7, 2025
43 checks passed
@burivuhster burivuhster deleted the ai-500-use-node-ids-instead-of-names-for-pinning-in-test-runner branch January 7, 2025 09:00
@janober
Copy link
Member

janober commented Jan 9, 2025

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 Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants