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

Cli server version #1709

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

laurentiuNiculae
Copy link
Contributor

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 4 times, most recently from 8ed525c to 0e49a3a Compare August 18, 2023 13:20
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (0dfff56) 91.88% compared to head (8569fdb) 91.85%.

Files Patch % Lines
pkg/cli/client/server_info_cmd.go 95.23% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1709      +/-   ##
==========================================
- Coverage   91.88%   91.85%   -0.04%     
==========================================
  Files         164      165       +1     
  Lines       27992    28125     +133     
==========================================
+ Hits        25721    25834     +113     
- Misses       1676     1692      +16     
- Partials      595      599       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 5 times, most recently from 3636575 to 4ab529d Compare August 25, 2023 08:05
@laurentiuNiculae laurentiuNiculae marked this pull request as ready for review August 25, 2023 10:58
@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 3 times, most recently from f563402 to ed10fca Compare August 28, 2023 08:32
@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 2 times, most recently from e08d137 to 44a6fc4 Compare September 8, 2023 07:53
@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 4 times, most recently from caa4de8 to 9c29625 Compare September 15, 2023 08:50
@andaaron andaaron linked an issue Sep 21, 2023 that may be closed by this pull request
@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 4 times, most recently from 4441781 to 4d835db Compare November 1, 2023 08:35
@rchincha rchincha added this to the v2.0.0 milestone Nov 1, 2023
andaaron
andaaron previously approved these changes Nov 10, 2023
@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 2 times, most recently from a4d3094 to 67c7757 Compare November 13, 2023 16:27
pkg/cli/client/server_info_cmd.go Outdated Show resolved Hide resolved
pkg/cli/client/server_info_cmd.go Outdated Show resolved Hide resolved
pkg/cli/client/server_info_cmd.go Outdated Show resolved Hide resolved
pkg/cli/client/server_info_cmd.go Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 2 times, most recently from f52aef9 to f9dc59f Compare November 17, 2023 17:09
@laurentiuNiculae
Copy link
Contributor Author

laurentiuNiculae commented Nov 20, 2023

Here are some examples of outputs

$ zli-linux-amd64 status --url http://127.0.0.1:5000 --user laur:password
Server Status: online
Server Version: bsd-0.0.4
Dist Spec Version: 1.1.0-dev
Built with: imagetrust, lint, metrics, mgmt, profile, scrub, search, sync, ui, userprefs

Bad Credentials:

$ zli-linux-amd64 status --url http://127.0.0.1:5000 --user laur:bad-pass
Server Status: unknown
Error: unauthorised access, given credentials are invalid

No Credentials:

$ zli-linux-amd64 status --url http://127.0.0.1:5000
Server Status: unknown
Error: unauthorised access, endpoint requires valid user credentials (add the flag '--user [user]:[password]')

MGMT is not enabled (minimal version):

$ zli-linux-amd64 status --url http://127.0.0.1:5000
Server Status: online
Error: /v2/_zot/ext/mgmt endpoint is not available

Server is offline:

$ zli-linux-amd64 status --url http://127.0.0.1:5000
Server Status: offline
Error: Get "http://127.0.0.1:8080/v2/": dial tcp 127.0.0.1:8080: connect: connection refused```
Given server isn't a OCI Registry:

Server is not Zot:

$ zli-linux-amd64 status --url http://127.0.0.1:8000
Server Status: offline
Error: registry at the given address doesn't implement the correct API: request at http://127.0.0.1:8000/v2/ failed

@laurentiuNiculae laurentiuNiculae force-pushed the cli-server-version branch 5 times, most recently from d4d35bc to c2fb0cf Compare November 20, 2023 14:46
@andaaron andaaron merged commit 83f287d into project-zot:main Nov 22, 2023
31 of 33 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.

[Feat] show zot server version using zli
4 participants