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

CLI: Add API health probe #601

Open
rajdip-b opened this issue Dec 31, 2024 · 1 comment
Open

CLI: Add API health probe #601

rajdip-b opened this issue Dec 31, 2024 · 1 comment
Labels
difficulty: 2 good first issue Good for newcomers help wanted Extra attention is needed priority: high scope: cli Everything related to the CLI type: feature Release drafter tag for tagging PRs related to adding new features

Comments

@rajdip-b
Copy link
Member

Description

Since our CLI can be configured to work with any version of the backend (self hosted / production / staging), we would need to ensure that the CLI first checks if the backend is reachable before issuing commands that make HTTP requests. Otherwise, we might land up with this error:
image

Solution

  • base.command.ts has canMakeHttpRequests. If this is set to true, we need to make a request to /api/health path to ensure the servers are reachable from BaseCommand#prepare function.
  • If the servers are reachable, we proceed with the method call.
  • If not, we inform the users about this, and quit with an error.
@rajdip-b rajdip-b added good first issue Good for newcomers help wanted Extra attention is needed type: feature Release drafter tag for tagging PRs related to adding new features priority: high difficulty: 2 scope: cli Everything related to the CLI labels Dec 31, 2024
@adityaRajGit
Copy link

I can work on this. Can I try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 2 good first issue Good for newcomers help wanted Extra attention is needed priority: high scope: cli Everything related to the CLI type: feature Release drafter tag for tagging PRs related to adding new features
Projects
None yet
Development

No branches or pull requests

2 participants