Skip to content

Conversation

@ajrbyers
Copy link
Member

@ajrbyers ajrbyers commented Jan 9, 2025

Closes #4350

router.register(r'keywords', views.KeywordsViewSet, 'keywords')
router.register(r'accounts', views.AccountViewSet, 'accounts')
router.register(r'versions', views.VersionViewSet, 'versions')
router.register(r'plugins', views.PluginViewSet, 'plugins')
Copy link
Member Author

Choose a reason for hiding this comment

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

I left these as single quote for consistency.

Copy link
Member

@joemull joemull left a comment

Choose a reason for hiding this comment

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

When I proposed this feature I should have added a bit more detail on the use case. It is often important to get the exact version an installation is on, when doing support, so you know how to help them.

The way you've done it, by relying on the Janeway Version rather than the Git tag for this information, we are not always getting the exact version. There could be RCs, or there could be a version tagged but not propagated to the Version object, like the current 1.7.3 release (the Version object shows as 1.7.2). Is there a safe way to get and display the Git tag?

Also, I had actually imagined this would be public, not behind an Editor permissions decorator, to make it easy to write a script. (Security implications?) As it is, I don't know how you'd write a script for this. Do we offer token authentication? It is not in our documentation, so can you document it? https://janeway.readthedocs.io/en/v1.7.2/dev/api.html

@ajrbyers
Copy link
Member Author

No worries. I think there is a git module we can use and we can inject the tag into the JSON. I still think this endpoint is useful. I think it should be behind authentication. I’ll add some info to docs.

@joemull joemull assigned ajrbyers and unassigned joemull Jan 10, 2025
@ajrbyers
Copy link
Member Author

ajrbyers commented Jan 23, 2025

  • Expose the Janeway version from src/janeway/init.py
  • Make this view public, and display more information if the view is authenticated

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.

As a system administrator, I want to poll my installation versions using the REST API

3 participants