-   Notifications  
You must be signed in to change notification settings  - Fork 456
 
Introduce a /version API #667
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
Conversation
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
|   Seems a little heavy to add a whole endpoint for this -- is there a simpler option like including it in some sort of headers/metadata on every request?  |  
 
 @tadasant - I got it stamped-approved by Claude 😄  |  
|   Did a round with Claude and I still think headers would be better here - Claude explanationThe Use Case MismatchYou're right that Kubernetes, Docker, and HashiCorp products have  
 The Problem with a Dedicated EndpointIf the goal is "debugging, auditing, and compatibility checks" as mentioned in the PR description, a dedicated endpoint is awkward for the compatibility use case: 
 Alternative SuggestionFor API version information that clients need for compatibility, response headers are more reliable and common: This way: 
 If we still want a  tl;dr: 
 But maybe we are conflating different things here. I think compatibility checks for consumers makes sense as headers (which to me appears to be the primary use case). If you're looking for internal build/debugging information (that likely only maintainers would ever ping), /version can make sense. I'm not opposed to adding /version if we just reframe as "this is an internal thing we never expect our users to deliberately hit".  |  
|   @tadasant - Oh, I think I know what's confusing. The endpoint in this PR is intended to  The details it returns are buildInfo, version (the git tag version, i.e. v1.3.0 and the git commit) edit: My bad, I just realised I actually put that in the PR description and is what confused you 🤦♂️ Yeah, you were right, this is not the intend. My value from this is if be able to see the server version and mainly use it to debug issues more easily.  |  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense with the reframing!
Motivation and Context
The following PR introduces a
/versionAPI that serves the build details along with the version of the API server being served. The/versionendpoint allows users to programmatically query which exact version of the registry is running in production for debugging.auditing, and compatibility checks.How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context