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

Feature: replace panic message "tried to run FaninNode without hooking the in channel up to another node" into a nicer error message #1629

Closed
alarbada opened this issue May 30, 2024 · 3 comments · Fixed by #1695
Assignees
Labels
bug Something isn't working

Comments

@alarbada
Copy link

alarbada commented May 30, 2024

Feature description

Related to #1026, I get the same panic:

         `::::::::::‘        Conduit v0.10.0 linux/amd64
             ‘‘‘‘            
2024-05-30T11:45:17+00:00 INF All 0 tables opened in 0s component=badger.DB
2024-05-30T11:45:17+00:00 INF Discard stats nextEmptySlot: 0 component=badger.DB
2024-05-30T11:45:17+00:00 INF Set nextTxnTs to 0 component=badger.DB
2024-05-30T11:45:17+00:00 INF loading processor plugins from directory /home/guillem/projects/conduit-connector-pinecone/processors ... component=plugin.processor.standalone.Registry
2024-05-30T11:45:17+00:00 WRN could not read processor plugin directory error="open /home/guillem/projects/conduit-connector-pinecone/processors: no such file or directory" component=plugin.processor.standalone.Registry
2024-05-30T11:45:17+00:00 INF standalone processor plugins initialized component=plugin.processor.standalone.Registry count=0 plugin_path=/home/guillem/projects/conduit-connector-pinecone/processors
2024-05-30T11:45:17+00:00 INF builtin plugins initialized component=builtin.Registry count=16
2024-05-30T11:45:17+00:00 INF builtin plugins initialized component=plugin.connector.builtin.Registry count=6
2024-05-30T11:45:17+00:00 WRN could not read connector plugin directory error="open /home/guillem/projects/conduit-connector-pinecone/connectors: no such file or directory" component=plugin.connector.standalone.Registry
2024-05-30T11:45:17+00:00 INF standalone connector plugins initialized component=plugin.connector.standalone.Registry count=0 plugin_path=/home/guillem/projects/conduit-connector-pinecone/connectors
2024-05-30T11:45:17+00:00 INF processors initialized component=processor.Service count=0
2024-05-30T11:45:17+00:00 INF connectors initialized component=connector.Service count=0
2024-05-30T11:45:17+00:00 INF pipelines initialized component=pipeline.Service count=0
2024-05-30T11:45:17+00:00 INF pipeline started component=pipeline.Service pipeline_id=file-to-pinecone
2024-05-30T11:45:17+00:00 INF pipeline configs provisioned component=provisioning.Service created=["file-to-pinecone"] deleted=[] pipelines_path=pipeline.destination.yml
2024-05-30T11:45:17+00:00 INF grpc server started address=[::]:8084
panic: tried to run FaninNode without hooking the in channel up to another node

goroutine 75 [running]:
github.com/conduitio/conduit/pkg/pipeline/stream.(*FaninNode).Run(0x35d10d8?, {0x35e1710?, 0xc0000e68c0?})
        /home/guillem/go/pkg/mod/github.com/conduitio/[email protected]/pkg/pipeline/stream/fanin.go:38 +0x22a
github.com/conduitio/conduit/pkg/pipeline.(*Service).runPipeline.func2()
        /home/guillem/go/pkg/mod/github.com/conduitio/[email protected]/pkg/pipeline/lifecycle.go:572 +0x227
gopkg.in/tomb%2ev2.(*Tomb).run(0xc00012cd70, 0x1fdb00001fd6?)
        /home/guillem/go/pkg/mod/gopkg.in/[email protected]/tomb.go:163 +0x2b
created by gopkg.in/tomb%2ev2.(*Tomb).Go in goroutine 1
        /home/guillem/go/pkg/mod/gopkg.in/[email protected]/tomb.go:159 +0xe5

Steps to reproduce

  1. With the following pipeline.destination.yml
version: 2.2
pipelines:
  - id: file-to-pinecone
    status: running
    connectors:
      - id: file.out
        type: destination
        plugin: builtin:file
        name: file-destination
        settings:
          path: ./file.out
          sdk.record.format: template
          sdk.record.format.options: '{{ printf "%s" .Payload.After }}'
  1. And the following command:

$ conduit -pipelines.path pipeline.destination.yml

I get the same panic. I did not need to build the pinecone connector.

Version

v0.10.0 linux/amd64

@alarbada alarbada added bug Something isn't working triage Needs to be triaged labels May 30, 2024
@hariso
Copy link
Contributor

hariso commented May 30, 2024

The internal FaninNode collects records from 1 or more sources and then forwards them to the next node.

Your pipeline has no source connectors, so the FaninNode complains that the in channel hasn't been hooked up to another node, i.e. no input to the FaninNode. In this case, that's quite expected, so I don't think there's a real issue here. Let me know if you still have some concerns about this, otherwise, I think we can close this one.

@alarbada
Copy link
Author

@hariso Hi there
Yeah, it is really a misconfiguration, it doesn't really make sense. I found that error just tinkering around. However, I'd like to see a better error than a panic, I had no idea what a FaninNode was until I delved into the conduit codebase.

Looks like a good first issue! If you don't mind @simonl2002 after I get some free time from the connectors work I'd like to see if I can make conduit output a better error than this panic.

Otherwise feel free to close this @hariso.

@hariso
Copy link
Contributor

hariso commented May 30, 2024

@alarbada Good that we're on the same page about this. I think you can change this issue into a feature that prints a nicer error message. We can easily do some checks before attempting to build a pipeline.

@alarbada alarbada changed the title Bug: confusing panic "tried to run FaninNode without hooking the in channel up to another node" Feature: confusing panic "tried to run FaninNode without hooking the in channel up to another node" Jun 4, 2024
@alarbada alarbada changed the title Feature: confusing panic "tried to run FaninNode without hooking the in channel up to another node" Feature: replace panic message "tried to run FaninNode without hooking the in channel up to another node" into a nicer error message Jun 4, 2024
@lovromazgon lovromazgon removed the triage Needs to be triaged label Jun 10, 2024
@lovromazgon lovromazgon moved this from Triage to Todo in Conduit Main Jun 10, 2024
@lovromazgon lovromazgon moved this from Todo to In Progress in Conduit Main Jun 10, 2024
@lovromazgon lovromazgon moved this from In Progress to Todo in Conduit Main Jun 10, 2024
@simonl2002 simonl2002 moved this from Todo to In Progress in Conduit Main Jun 26, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Conduit Main Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants