bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
676 stars 88 forks source link

Be able to identify where a config setting is coming from #4476

Closed aronchick closed 3 weeks ago

aronchick commented 1 month ago

If you have a config setting, you shuld be able to identify the source. E.g. I'm having an issue with spinning up NATS and I have no idea where this setting is coming from.

❯ b15 serve --compute --api-port 2233 -c "compute.labels=name=compute1"
16:17:49.145 | INF pkg/config/config.go:211 > Config loaded from: [], and with data-dir /var/folders/22/0hyg7lbs2fb34hr0ryq3sl1m0000gn/T/bacalhau_test.ajC5YLIYC1
16:17:49.146 | INF pkg/repo/fs.go:91 > Initializing repo at /var/folders/22/0hyg7lbs2fb34hr0ryq3sl1m0000gn/T/bacalhau_test.ajC5YLIYC1
16:17:49.166 | INF cmd/cli/serve/serve.go:142 > persisted node name n-5147e4e2-83a5-486c-a28f-b53dcfc03a1c
16:17:49.203 | INF cmd/cli/serve/serve.go:219 > Starting bacalhau...
error creating node: failed to create NATS transport layer: nats: no servers available for connection
❯ rm -rf ~/.config/bacalhau
❯ rm -rf ~/.bacalhau
❯ rm /Users/daaronch/Library/Application\ Support/bacalhau/config.yaml
❯ b15 serve --compute --api-port 2233 -c "compute.labels=name=compute1"
16:35:01.65 | INF pkg/config/config.go:211 > Config loaded from: [], and with data-dir /var/folders/22/0hyg7lbs2fb34hr0ryq3sl1m0000gn/T/bacalhau_test.ajC5YLIYC1
16:35:01.674 | INF cmd/cli/serve/serve.go:219 > Starting bacalhau...
error creating node: failed to create NATS transport layer: nats: no servers available for connection
❯ b15 serve --compute --api-port 2233 -c "compute.labels=name=compute
wdbaruni commented 3 weeks ago

Fixed by better errors https://github.com/bacalhau-project/bacalhau/pull/4536