Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

chore: replace cluster status and explorer configuration with about handler #111

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

hugoArregui
Copy link

@hugoArregui hugoArregui commented Jul 14, 2022

The about endpoint will return:

  • Comms version
  • Service health (by querying lambda if v2, or querying lambda + archipelago status discovery if v3)

@hugoArregui hugoArregui requested a review from agusaldasoro July 14, 2022 14:41
src/controllers/handlers/about-handler.ts Show resolved Hide resolved
}

try {
const response = await fetch.fetch(`${lambdasUrl}/health`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we check the response code here too?

Copy link
Author

Choose a reason for hiding this comment

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

I don't think so, I added some unit tests


const data: Record<string, string> = await response.json()

body.content.healthy = data['content'] === 'Healthy'
Copy link
Contributor

Choose a reason for hiding this comment

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

if data['content'] is undefined this will be false, right?

Copy link
Author

@hugoArregui hugoArregui Jul 15, 2022

Choose a reason for hiding this comment

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

yes, I added some unit tests

@hugoArregui hugoArregui merged commit fb73ee6 into main Jul 15, 2022
@hugoArregui hugoArregui deleted the chore/about-handler branch July 15, 2022 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants