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

Do not report version when upstream check fails #1124

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

stoned
Copy link
Contributor

@stoned stoned commented Sep 11, 2022

... otherwise you could get something like the following (here sops is run without network connection available):

$ ./sops --version
sops 3.7.3
[warning] failed to retrieve latest version from upstream: Get "https://raw.githubusercontent.com/mozilla/sops/master/version/version.go": dial tcp: lookup raw.githubusercontent.com: Temporary failure in name resolution

[warning] failed to compare current version with latest: Version string empty
 (latest)
$

@hiddeco
Copy link
Member

hiddeco commented Jul 6, 2023

Already fixed via #1115

@hiddeco hiddeco closed this Jul 6, 2023
@hiddeco hiddeco removed this from the v3.8.0 milestone Jul 6, 2023
@felixfontein
Copy link
Contributor

@hiddeco this hasn't been fixed. What this PR is fixing is that in case of a comparison error (when the new version is fetched), that both the error and (latest) (which is wrong) are printed.

(Probably the whole comparison logic should be skipped when a network error happens, though, instead of a network error triggering the "Version string empty" error.)

@hiddeco hiddeco reopened this Jul 6, 2023
@hiddeco
Copy link
Member

hiddeco commented Jul 6, 2023

@felixfontein you are absolutely right, thanks.

@stoned any chance you can rebase and sign-off your commit?

@hiddeco hiddeco added this to the v3.8.0 milestone Jul 6, 2023
@stoned stoned force-pushed the version-no-report-on-error branch from f3fd010 to bccb380 Compare July 24, 2023 04:35
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Thank you @stoned 🙇 🥭

@hiddeco hiddeco changed the title Only report version check when it can be Do not report version when upstream check fails Aug 14, 2023
Signed-off-by: Stoned Elipot <stoned.elipot@gmail.com>
@hiddeco hiddeco merged commit cc30d49 into getsops:main Aug 14, 2023
7 checks passed
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.

None yet

3 participants