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

System / gRPC API should provide information about evitaDB server version #406

Closed
novoj opened this issue Jan 8, 2024 · 5 comments · Fixed by #427
Closed

System / gRPC API should provide information about evitaDB server version #406

novoj opened this issue Jan 8, 2024 · 5 comments · Fixed by #427
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@novoj
Copy link
Collaborator

novoj commented Jan 8, 2024

We need to provide sever version in gRPC evitaLab API, so then the clients can visualize it and reason about it. We should also provide a method to detect the client version. Java client should log an error/warning if its minor version differs from the server version, as it might signal compatibility problems.

@novoj novoj self-assigned this Jan 8, 2024
@novoj novoj added the enhancement New feature or request label Jan 8, 2024
@novoj novoj added this to the Alpha milestone Jan 8, 2024
@lukashornych
Copy link
Collaborator

At this point I suggest to create an endpoint in the system API that would return simplified info about the evitaDB instance like we've already talked about.

Because we already need server name and evitaDB version and evitaLab would benefit from list of running APIs with their URLs (even though this could be separate API in the lab API):

{
  "serverName": "evitadb",
  "version": "1.0.0",
  "apis": [
    "graphql": {
      "url": "https://localhost:5555/gql"
    }
  ]
}

@novoj
Copy link
Collaborator Author

novoj commented Jan 11, 2024

We need to consider that this endpoint will sometimes need to be behind authentication in the future. The server must not return its version to an unauthenticated client for security reasons.

@lukashornych
Copy link
Collaborator

We could return differently rich objects based on authentication. E.g. for non-authenticated:

{
  "serverName": "evitadb"
}

and for authenticated as I mentioned above.

Yeah if would have different endpoints for these, would easily setup the auth. rules based on endpoint paths, but the REST API will definitely have to have some tools for enabling/disabling returned properties, which we could maybe reuse here and have single endpoint.

@novoj novoj changed the title gRPC / evitaLab API should provide information about evitaDB server version System / gRPC API should provide information about evitaDB server version Jan 17, 2024
novoj added a commit that referenced this issue Jan 17, 2024
…B server version

We need to provide sever version in gRPC evitaLab API, so then the clients can visualize it and reason about it. We should also provide a method to detect the client version. Java client should log an error/warning if its minor version differs from the server version, as it might signal compatibility problems.

Implemented the gRPC part and the compatibility check.
@novoj
Copy link
Collaborator Author

novoj commented Jan 17, 2024

gRPC implementation and compatibility check in client is done. Tomorrow I'll implement the system endpoint.

@novoj
Copy link
Collaborator Author

novoj commented Jan 18, 2024

System status endpoint implemented example resonse:

curl http://jnonb:5557/system/status
{
   "serverName": "evitaDB-f9a9ed14afc64fd6",
   "version": "10.1-SNAPSHOT",
   "startedAt": "2024-01-18T09:01:29.689532945+01:00",
   "uptime": 192,
   "uptimeForHuman": "3m 12s",
   "catalogsCorrupted": 0,
   "catalogsOk": 2,
   "apis": [
      {
         "system": [
            "http://localhost:5557/system/",
            "http://jnonb:5557/system/"
         ]
      },
      {
         "graphQL": [
            "https://localhost:5555/gql/",
            "https://jnonb:5555/gql/"
         ]
      },
      {
         "rest": [
            "https://localhost:5555/rest/",
            "https://jnonb:5555/rest/"
         ]
      },
      {
         "gRPC": [
            "https://localhost:5556/",
            "https://jnonb:5556/"
         ]
      },
      {
         "lab": [
            "https://localhost:5555/lab/",
            "https://jnonb:5555/lab/"
         ]
      }
   ]
}

novoj added a commit that referenced this issue Jan 18, 2024
…B server version

We need to provide sever version in gRPC evitaLab API, so then the clients can visualize it and reason about it. We should also provide a method to detect the client version. Java client should log an error/warning if its minor version differs from the server version, as it might signal compatibility problems.

Implemented system endpoint.
novoj added a commit that referenced this issue Jan 18, 2024
…vide-information-about-evitadb-server-version

feat(#406): System / gRPC API should provide information about evitaDB server version
novoj added a commit that referenced this issue Jan 18, 2024
…B server version

Support for accessing client version via API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants