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

Automatically perform update checks on every command #2893

Closed
simonwo opened this issue Oct 10, 2023 · 0 comments · Fixed by #2909
Closed

Automatically perform update checks on every command #2893

simonwo opened this issue Oct 10, 2023 · 0 comments · Fixed by #2909
Assignees
Labels
type/enhancement Type: New features or enhancements to existing features

Comments

@simonwo
Copy link
Contributor

simonwo commented Oct 10, 2023

In v1.1.1 we added an update check feature to bacalhau version command. This is useful but users don't run that command very often.

Now we want to run the check for every command. As ever, the update check should:

  • print out a message at the end of the command if an update is required
  • fail silently, no error message should be printed if the update check fails
  • terminate silently if the command completes before the update check is finished
@simonwo simonwo added the type/enhancement Type: New features or enhancements to existing features label Oct 10, 2023
@simonwo simonwo self-assigned this Oct 10, 2023
simonwo added a commit that referenced this issue Oct 16, 2023
In #2893 we made more commands check for updates. Strictly not all of
these checks are necessary as the code is unlikely to have changed
regularly. Instead we should limit the amount we check for updates to
(perhaps) once per day.

Every time we perform an update check, we write the current time into
update.json. Every time we run a command. if the current time is less
than 24h after this value, don't do any checking. If the current time
is 24h ahead of this value, do an update check.
simonwo added a commit that referenced this issue Oct 16, 2023
In #2893 we made more commands check for updates. Strictly not all of
these checks are necessary as the code is unlikely to have changed
regularly. Instead we should limit the amount we check for updates to
(perhaps) once per day.

Every time we perform an update check, we write the current time into
update.json. Every time we run a command. if the current time is less
than 24h after this value, don't do any checking. If the current time
is 24h ahead of this value, do an update check.
simonwo added a commit that referenced this issue Oct 17, 2023
In #2893 we made more commands check for updates. Strictly not all of
these checks are necessary as the code is unlikely to have changed
regularly. Instead we should limit the amount we check for updates to
(perhaps) once per day.

Every time we perform an update check, we write the current time into
update.json. Every time we run a command. if the current time is less
than 24h after this value, don't do any checking. If the current time
is 24h ahead of this value, do an update check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: New features or enhancements to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant