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 disabled parent output in partial execution #3946

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Aug 25, 2022

Running twice a node whose parent is disabled causes the disabled parent to produce output. Reproducible at least since 0.180.

In a partial execution:

  • skip disabled node when marking start nodes
  • skip disabled node when collecting incoming data
  • skip disabled node when filtering for nodes to run

To test, run Destination twice - both times the disabled parent should output nothing.

{
  "nodes": [
    {
      "parameters": {
        "path": "1a7141ce-8a2b-4e72-aba4-1a31db380607",
        "options": {}
      },
      "id": "f476600c-1fd6-4b1b-bb69-a8726543f7f9",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        980,
        360
      ],
      "webhookId": "1a7141ce-8a2b-4e72-aba4-1a31db380607",
      "disabled": true
    },
    {
      "parameters": {
        "functionCode": "return [\n  {\n    source: true, \n  }\n]"
      },
      "id": "486726c1-f561-4ec1-89e4-1de679c8ca90",
      "name": "Source",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        980,
        540
      ]
    },
    {
      "parameters": {
        "functionCode": "return items;"
      },
      "id": "dad217d1-3316-412a-9ef7-672836d74f18",
      "name": "Destination",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        1240,
        360
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Destination",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Source": {
      "main": [
        [
          {
            "node": "Destination",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Aug 25, 2022
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.

Looks good, I've ran a few tests and it seems to be fine.

@ivov ivov merged commit c8743ff into master Sep 1, 2022
@ivov ivov deleted the n8n-4434-fix-disabled-parent-output-in-partial branch September 1, 2022 13:43
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Sep 1, 2022
@janober
Copy link
Member

janober commented Sep 6, 2022

Got released with [email protected]

@janober janober removed the Upcoming Release Will be part of the upcoming release label Sep 6, 2022
valya pushed a commit to valya/n8n that referenced this pull request Nov 8, 2022
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 ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants