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

Setup detailed version endpoint #163

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

jonathangreen
Copy link
Member

Description

This PR adds a new endpoint version.json to the library registry, similar to the PR that added the same functionality to the circulation manager ThePalaceProject/circulation#765. This new version.json endpoint replaces the old healthcheck endpoint. This endpoint returns version information for the circulation manager instance, and for the admin UI. This is currently helpful, but will be even more helpful when we are doing more rapid deployments, so that we can check what version is deployed where.

The new endpoint returns something like this:

{
  "admin_ui": {
    "package": "@thepalaceproject/circulation-admin",
    "version": "0.4.2"
  },
  "branch": "main",
  "commit": "00f33eb39163937cfe864537124a43058e216a57",
  "version": "1.0.1"
}

The version is derived from the git tag by Dunamai. If the commit is not a tagged version, it will create a version number based on the distance from the last tagged version and the commit hash. Something like 1.0.2-post.51+00f33eb39.

Motivation and Context

Same context and motivation as the CM PR.

How Has This Been Tested?

  • Running unit tests locally & in CI

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jonathangreen jonathangreen requested a review from a team February 22, 2023 00:19
Copy link
Contributor

@io7m io7m left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jonathangreen jonathangreen merged commit 4b419f9 into main Feb 22, 2023
@jonathangreen jonathangreen deleted the feature/detailed-version-endpoint branch February 22, 2023 14:56
@jonathangreen jonathangreen mentioned this pull request Feb 23, 2023
2 tasks
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.

2 participants