Skip to content

Create GET API endpoint returning the information about server's version #396

@lsulak

Description

@lsulak

Background

Currently the server is not aware of its version and thus we are also not able to know what version is currently deployed. It's a good practice to have such informative endpoint available, even if we don't have a UI.

Feature

We have GET API endpoint rendering information about the version of the service. This could be as simple as GET /version or GET /api/v2/info/version or GET /api/v2/version. This information is supposed to be obtained from Git somehow.

Note that in Ursa Unify project we did this with maven git plugin, see GitVersionController and it is based on git.properties file and field git.commit.id.describe.

Business Value

Engineers, users, and analysts know exactly what version of Atum Service they work with.


Technical stuff, from Unify:

  *  Why this `git.commit.id.describe`?
   *  For annotated tags (e.g. final version `v1.2.3`), it will directly hold the tag name value
   *  {{{
   *      v1.2.3
   *  }}}
   *  For non-final values, it will hold reference to the closest annotated tag (`v1.2.3`) with distance count (`13`)
   *  and a short hash of the commit for reference (`91a9c23`), so e.g.
   *  {{{
   *      v1.2.3-13-g91a9c23
   *  }}}
   *  or even with `-dirty` suffix with uncommitted changes:
   *  {{{
   *      v1.2.3-13-g91a9c23-dirty
   *  }}}
  

Note: have some fallback constant there in case it can't be derived from the above, like "unknown" or so.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Status

🆕 To groom

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions