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

Error and fail start.sh on misconfiguration #1605

Closed

Conversation

mathbunnyru
Copy link
Member

@mathbunnyru mathbunnyru commented Feb 5, 2022

Fix: #1517

@mathbunnyru mathbunnyru marked this pull request as draft February 5, 2022 12:05
@mathbunnyru
Copy link
Member Author

I want to know your opinion and also need to fix the tests.

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Hmmm you make the log function exit on error. I'm not so fond of making its purpose be expanded to that while still being named just _log.

I think I'd favor being explicit and including multiple exit codes. One could also consider having separate non-zero exit codes for the errors when exiting to allow users recognize an error via the exit code as well.

@mathbunnyru
Copy link
Member Author

Thanks for your suggestion, I will fix this.
In general, do you agree with exiting on errors like these?

@consideRatio
Copy link
Member

Hmmm... I think so, but I'm not that confident about it.

Do we have default values for the environment variables etc that can cause trouble, forcing someone to explicitly configure something to avoid errors? That would be a signal to me that we have been too strict.

@mathbunnyru
Copy link
Member Author

I think the defaults are good, but I think there are many cases, where user sets one variable and forgets about another one (like chaning username requires --user root).
In cases like this the behavior is not clear.
The user gets a warning, but I beleive no one reads warnings until "it somehow works".

@mathbunnyru
Copy link
Member Author

Closing this one, I don't think I'm gonna have enough time in the nearest future to finish this PR.

@mathbunnyru mathbunnyru closed this May 4, 2022
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.

Make the start script fail loudly with an error where it makes sense
2 participants