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

Fix autoupdate checks #3303

Closed
wants to merge 1 commit into from
Closed

Fix autoupdate checks #3303

wants to merge 1 commit into from

Conversation

MDrakos
Copy link
Member

@MDrakos MDrakos commented May 14, 2024

BugDX-2824 `state --version` after install doesn't show version available

This fixes a couple of issues but we should have some follow up work planned for a more robust fix.

I found that the cobra search command will return the parent command if it can't find an appropriate child, at least in the case of state --version it will strip the flag and return the parent command if there are no more arguments.

Since we want to run the autoupdate check for state --version we have to update the handling in main.go. In going through this I found that we have 3 separate checks for "Should we run autoupdate". These should be centralized however I didn't address this for the bug fix as this is targeting an RC4 that we would like to release soon.

Lastly, we check the modification time of the installed binary and will not run the autoupdate if the file is less than 24 hours old. I did not modify that as part of this PR but I can if we no longer desire that behaviour.

@MDrakos
Copy link
Member Author

MDrakos commented May 15, 2024

Closing this as we will file follow-up work to address and clean up the root cause of the issue.

@MDrakos MDrakos closed this May 15, 2024
@MDrakos MDrakos deleted the DX-2824 branch May 15, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant