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

feat(elasticsearch): Add servlet which provides an endpoint for a healthcheck on the ES cl… #7799

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

iprentic
Copy link
Contributor

…ient

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the devops PR or Issue related to DataHub backend & deployment label Apr 11, 2023
* Checks the memoized cache for the latest elastic health check result
* @return The ResponseEntity containing the health check result
*/
@GetMapping(path = "/elastic", produces = MediaType.APPLICATION_JSON_VALUE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is the combined healthcheck endpoint. Specifically, the one that produces a common message with all of the component checks? The one which would be used by a readiness check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still to come.... :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still to come.... :D

private Supplier<ResponseEntity<String>> memoizedSupplier;

public HealthCheckController () {
this.memoizedSupplier = Suppliers.memoizeWithExpiration(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

@iprentic iprentic merged commit 3bd6378 into master Apr 20, 2023
@iprentic iprentic deleted the es-health-servlet branch April 20, 2023 16:12
iprentic added a commit that referenced this pull request Apr 27, 2023
…lthcheck on the ES cl… (#7799)

Co-authored-by: Indy Prentice <[email protected]>
Co-authored-by: Pedro Silva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants