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

refactor: Set up env config #17

Merged
merged 13 commits into from
Nov 25, 2024
Merged

refactor: Set up env config #17

merged 13 commits into from
Nov 25, 2024

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Nov 25, 2024

This PR is setup for runner health monitoring to be done at https://linear.app/n8n/issue/PAY-2280

  • Move all env retrieval and validation to the env package
  • Add N8N_RUNNERS_SERVER_ENABLED and N8N_RUNNER_URI to required envs
  • Set up constants for all env var names

Copy link
Contributor

@tomi tomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to refactor this 👍 Left couple comments

const (
// ------------------------
// auth
// ------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use

// #region auth
...
// #endregion auth

to make these foldable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently not supported for Go? https://share.cleanshot.com/5lyhDHfR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I thought I tested it and it worked but seems it only folded the start of the comment :/ Yeah doesn't seem to be supported

internal/env/env.go Outdated Show resolved Hide resolved
internal/env/env.go Show resolved Hide resolved
internal/env/env.go Outdated Show resolved Hide resolved
internal/env/env.go Show resolved Hide resolved
internal/env/env.go Outdated Show resolved Hide resolved
internal/env/env.go Show resolved Hide resolved
Copy link
Contributor

@tomi tomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ivov ivov merged commit a92df91 into main Nov 25, 2024
2 checks passed
@ivov ivov deleted the env-config branch November 25, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants