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 force-pushed the version-no-report-on-error branch from bccb380 to 367101b Compare August 14, 2023 22:37
@hiddeco hiddeco changed the title Only report version check when it can be Do not report version when upstream check fails Aug 14, 2023
@hiddeco hiddeco force-pushed the version-no-report-on-error branch from 367101b to 5adb51f Compare August 14, 2023 22:49
Signed-off-by: Stoned Elipot <stoned.elipot@gmail.com>
@hiddeco hiddeco force-pushed the version-no-report-on-error branch from 5adb51f to cb1a43d Compare August 14, 2023 22:49
@hiddeco hiddeco merged commit cc30d49 into getsops:main Aug 14, 2023
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.

3 participants