-
Notifications
You must be signed in to change notification settings - Fork 0
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: Feature parity with Rust launcher #2
base: master
Are you sure you want to change the base?
Conversation
internal/commands/launch.go
Outdated
cfgNum := len(cfg.TaskRunners) | ||
|
||
if cfgNum == 1 { | ||
log.Print("Loaded config file loaded with a single runner config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger writes to stderr by default, which is not what we would want here. Also could we enable these logs only if certain env var is set, similar to RUST_LOG
in the rust launcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also could we enable these logs only if certain env var is set, similar to RUST_LOG in the rust launcher
Why do we want to allow hiding the launcher logs by default? n8n main, worker, webhook, etc. all show at least info logs by default. As a user I'd like to always have a few informative lines to know the runner is working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider most of these logs to be debug logs, like for example the loading of the config here. Sure we can keep one or two to know the runner is working, (tho it can also be interpreted from the log from n8n that runner has connected), but we don't need all of these. This would be in quite contrast compared to what we log in the n8n app itself, which is very minimal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, let's do this division of info/debug logs as a follow up 👍🏻
Thanks for the feedback! 🙏🏻 Addressed, let me know what you think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing about the launch command, otherwise looking good 👏
cmd/launcher/main.go
Outdated
) | ||
|
||
func main() { | ||
if len(os.Args) < 2 { | ||
log.Fatal("Missing argument. Expected `launch` or `kill` subcommand") | ||
logs.Logger.Fatal("Missing argument. Expected `launch` or `kill` subcommand") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this only does "launch" now, we don't need the launch
command when starting this. It can do that by default. Instead we could take the runner type as the first arg:
./bin/main javascript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -7,6 +7,8 @@ import ( | |||
"os" | |||
) | |||
|
|||
const configPath = "/etc/n8n-task-runners.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would still be nice to test this locally without having to write to /etc/
. We can do that later on tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
https://linear.app/n8n/issue/PAY-2243