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

docs: add Healthcheck API endpoints to 'REST API' page #1802

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

hassankhan
Copy link
Contributor

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made (if issue reference is not provided)

Followup for #1607

@hassankhan hassankhan added the docs Issues that require a documentation improvement label Jan 18, 2021
@hassankhan hassankhan self-assigned this Jan 18, 2021
@hassankhan hassankhan requested a review from a team as a code owner January 18, 2021 15:42
@hassankhan hassankhan added this to In progress in Roadmap 2021 Q1 via automation Jan 18, 2021
@hassankhan hassankhan requested a review from a team January 18, 2021 16:08
@keydunov
Copy link
Member

Looks good! Should we share in more details what is tested both on readyz and livez? E.g. database connection. What do you think? @hassankhan @paveltiunov @ovr

@hassankhan
Copy link
Contributor Author

@keydunov That sounds like a great idea 👍

WDYT of the following?:

/readyz

Returns the ready state of the deployment. Ensures that a successful connection is set up between Cube.js and its' cache and queue.

/livez

Returns the liveness state of the deployment. Ensures that a successful connection is set up between Cube.js and all of the configured data sources.

@keydunov
Copy link
Member

There are some details about the testing database connection with single-tenant setup vs multi-tenant. AFAIK readyz does the database test as well, but only for single-tenant applications.


### /readyz

Returns the ready state of the deployment.
Copy link
Member

@ovr ovr Jan 18, 2021

Choose a reason for hiding this comment

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

Should we add details that:

For single tenant: It's open a new OrchestratorApi (I don't know how to name it in documentation) for default datasource to test connection?
For multi tenancy: It checks only created connections per tenant via OrchestratorApi (datasources), if no connections exist it will return OK.

How it stores connections:

SingleTenant:
    - OrchestratorApi (multi sources can exists)
       - DataSource1
       - DataSource2

MultiTenant:
    - Tenant1
        - OrchestratorApi (multi sources can exists)
           - DataSource1
           - DataSource2
     - Tenant2
        - OrchestratorApi (multi sources can exists)
           - DataSource1
           - DataSource2

P.S

It's test connection to queue/cache driver, but it's similar for now.

@hassankhan hassankhan linked an issue Jan 20, 2021 that may be closed by this pull request
@hassankhan hassankhan force-pushed the hassankhan/docs/add-healthcheck-api branch 2 times, most recently from 16c49e0 to d39277f Compare January 21, 2021 22:42
@hassankhan hassankhan force-pushed the hassankhan/docs/add-healthcheck-api branch from d39277f to b823f6c Compare January 21, 2021 23:35
@hassankhan hassankhan merged commit b823f6c into master Jan 22, 2021
Roadmap 2021 Q1 automation moved this from In progress to Done Jan 22, 2021
@hassankhan hassankhan deleted the hassankhan/docs/add-healthcheck-api branch January 22, 2021 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues that require a documentation improvement
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Need an unauthorised endpoint for health-checks
3 participants