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

[misc] Slient & non-blocking version check #3816

Merged
merged 12 commits into from
Dec 17, 2021

Conversation

Leonz5288
Copy link
Contributor

Now version check runs silently per 7 days. Nothing will be printed in terminal.
If user's version is outdated, a latest_version file will be written to ~/.taichi and the latest version will be recorded.
After that, no more version check in 7 days. When user use Taichi again, if the current version is lower than the version recorded in the file, the latest version will be printed with the Taichi header. For example:
[Taichi] version 0.8.7, latest version 0.9.0, llvm 10.0.0, commit abcdef, linux, python 3.8.10

@netlify
Copy link

netlify bot commented Dec 16, 2021

✔️ Deploy Preview for jovial-fermat-aa59dc ready!

🔨 Explore the source changes: fbcdf55

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61bc31a96c427b00072499fd

😎 Browse the preview: https://deploy-preview-3816--jovial-fermat-aa59dc.netlify.app

@Leonz5288
Copy link
Contributor Author

/format

@Leonz5288
Copy link
Contributor Author

Leonz5288 commented Dec 16, 2021

Now this service runs in a new thread and main thread will not wait for the new thread to finish (prevent blocking user).
I also tested a few cases related to network issues, for example, timeout, domain mismatch, network down, etc. Nothing will be printed on terminal and Taichi main process will run as normal.
If there are other cases that comes to your mind, please tell me so I can test more.

@Leonz5288
Copy link
Contributor Author

/format

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

LGTM!

python/taichi/lang/__init__.py Outdated Show resolved Hide resolved
python/taichi/lang/__init__.py Outdated Show resolved Hide resolved
python/taichi/lang/__init__.py Show resolved Hide resolved
Copy link
Collaborator

@rexwangcc rexwangcc left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! (let's resolve all comments before merging 😃 )

@Leonz5288 Leonz5288 merged commit 1347515 into taichi-dev:master Dec 17, 2021
@Leonz5288 Leonz5288 deleted the slient branch December 17, 2021 07:53
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.

5 participants