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

Check for updates #14

Closed
pouriyajamshidi opened this issue May 29, 2022 · 7 comments
Closed

Check for updates #14

pouriyajamshidi opened this issue May 29, 2022 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@pouriyajamshidi
Copy link
Owner

Summary

TCPING is constantly being worked on and updated. Our users could benefit from these features.

We need to check for updates upon running the program and display a message if there is a newer version.

Important Notes

This should not cause tcping to get flagged as a malicious program on Windows. If we see this is the case but the benefits of checking for a newer versions exceeds the inconvenience, we might end up splitting the Windows version or to just make it an optional flag.

@icemint0828
Copy link
Contributor

icemint0828 commented May 30, 2022

This is my first time dealing with this type of problem, but I would like to give it a try.
The following is the process I'm considering

  • Get release version with go-github package.
  • Compare with const version.
  • If latest version is exist, print message to prompt for version up.

What do you think?

P.S.
I become able to use slack!
If you have no problem, please invite me.

@icemint0828
Copy link
Contributor

From reading the Github API documentation, it appears that unauthenticated requests from the same IP are limited to 60 per hour.

For unauthenticated requests, the rate limit allows for up to 60 requests per hour.
Unauthenticated requests are associated with the originating IP address, and not the person making requests.

If we implement this feature without the flag, users may end up consuming a number of API requests on github every time they run tcping.

Is there any good way to do this?

@pouriyajamshidi
Copy link
Owner Author

This is my first time dealing with this type of problem, but I would like to give it a try. The following is the process I'm considering

  • Get release version with go-github package.
  • Compare with const version.
  • If latest version is exist, print message to prompt for version up.

What do you think?

P.S. I become able to use slack! If you have no problem, please invite me.

icemint0828@gmail.com

Hi,

Your thought process looks fine to me as well.

I am not really familiar with go-github package but it is fine for me.
I would like to keep our program clean and also as simple as possible. If you notice, I did refactor a lot of things over the weekend as well.

I also contacted you through the email you provided (and removed the email from your comment for privacy reasons).

@pouriyajamshidi
Copy link
Owner Author

From reading the Github API documentation, it appears that unauthenticated requests from the same IP are limited to 60 per hour.

For unauthenticated requests, the rate limit allows for up to 60 requests per hour.
Unauthenticated requests are associated with the originating IP address, and not the person making requests.

If we implement this feature without the flag, users may end up consuming a number of API requests on github every time they run tcping.

Is there any good way to do this?

That is a very valid concern. Let's not automatically do it by default.
Better to only do it when they actually check for an update.

@pouriyajamshidi
Copy link
Owner Author

Based on the discussion here, this issue can be ruled out in favor of #15

@icemint0828
Copy link
Contributor

Hi.

Your thought process looks fine to me as well.

Thank you for your opinion!

That is a very valid concern. Let's not automatically do it by default.

I see.
I'll make sure it's finally implemented that way.

Better to only do it when they actually check for an update

Yes, I think too. But, I don't have any ideas at the moment.

First, when I implement the update message is displayed without flag, I will put out a PR.

@pouriyajamshidi
Copy link
Owner Author

Hi.

Your thought process looks fine to me as well.

Thank you for your opinion!

That is a very valid concern. Let's not automatically do it by default.

I see. I'll make sure it's finally implemented that way.

Better to only do it when they actually check for an update

Yes, I think too. But, I don't have any ideas at the moment.

First, when I implement the update message is displayed without flag, I will put out a PR.

perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants