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

Added version checker on Headscale startup #128

Merged
merged 3 commits into from
Sep 27, 2021
Merged

Added version checker on Headscale startup #128

merged 3 commits into from
Sep 27, 2021

Conversation

juanfont
Copy link
Owner

This small PR just adds an updated version checker on startup.

It uses https://github.com/tcnksm/go-latest to fetch the latest release in GitHub.

@juanfont juanfont requested a review from kradalby September 27, 2021 14:38
@qbit
Copy link
Contributor

qbit commented Sep 27, 2021

Would it be possible to add a config option to disable this? At least in OpenBSD ports land it's typical that these kind of checks are disabled so as not to cause confusion for people that installed it via pkg_add.

The alternative would be that I have to carry patches in the OpenBSD port to disable the check.

Copy link
Collaborator

@kradalby kradalby left a comment

Choose a reason for hiding this comment

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

Actually @qbit has a good point.

Also having something call the internet is not optimal without being able to disable it.

How does that library handle lack of internet?

@juanfont
Copy link
Owner Author

@qbit @kradalby indeed, that's hell of a point. Would make sense to limit the checks to runtime.GOOS == "linux" and runtime.GOOS == "darwin" (the OS that we have binaries for) ?

@qbit
Copy link
Contributor

qbit commented Sep 27, 2021

That makes sense to me, I do still think it would be good to have an option to completely disable it for people that don't want to tell github what software they are running.

@kradalby
Copy link
Collaborator

@qbit @kradalby indeed, that's hell of a point. Would make sense to limit the checks to runtime.GOOS == "linux" and runtime.GOOS == "darwin" (the OS that we have binaries for) ?

No OS checks, those operating systems also have package managers.

It should be possible to turn off for all package maintainers

@juanfont
Copy link
Owner Author

This small PR

Famous last words 😂😂

Indeed, those OS might end up having Headscale packages. We leave it then as a viper config setting (via the config.json or ENV) ?

@qbit
Copy link
Contributor

qbit commented Sep 27, 2021

LGTM!

@juanfont juanfont merged commit e9ea698 into main Sep 27, 2021
@juanfont juanfont deleted the version-checker branch September 27, 2021 21:28
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.

3 participants