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

Ledger API: Add healthcheck endpoints. #3573

Merged
merged 25 commits into from
Nov 22, 2019
Merged

Conversation

SamirTalwar
Copy link
Contributor

Step 1 of implementing #2733.

Compliant with the GRPC Health Checking Protocol.

These are always SERVING for now.

I'd like to make the Sandbox report NOT_SERVING when, for example, the PostgreSQL connection is lost, but this will require a bunch of testing and a lot more code, so I'd like to stage the work.

Also forthcoming: documentation on how to use this endpoint (spoiler: grpc-health-probe), and how to make your own ledger report its health accurately.

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags, if appropriate
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

Copy link
Contributor

@stefanobaghino-da stefanobaghino-da left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, can you have a close look at the comments in TimeBoundObserver before merging?

SamirTalwar and others added 8 commits November 21, 2019 16:26
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
That'll teach me not to `--no-verify` just because it's a merge commit.
At some point it was being used twice.
Copy link
Contributor

@gerolf-da gerolf-da left a comment

Choose a reason for hiding this comment

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

Thanks. One comment we should talk about is Protobuf-Java vs. ScalaPB service implementation.

class HealthService(watchThrottleFrequency: FiniteDuration = 1.second)(
implicit materializer: Materializer,
executionContext: ExecutionContext
) extends HealthGrpc.HealthImplBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer if we could stick with the scalapb rpc implementation for services, otherwise we start having a mix of how services are implemented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@SamirTalwar
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@SamirTalwar
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

"src/main/scala/**/*.scala",
]),
tags = [
"maven_coordinates=com.digitalasset.ledger-api:rs-grpc-testing-utils:__VERSION__",
Copy link
Contributor

Choose a reason for hiding this comment

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

Yay, the release check actually worked 🎉

@mergify mergify bot merged commit 0ff716d into master Nov 22, 2019
@mergify mergify bot deleted the ledger/sandbox/healthchecks branch November 22, 2019 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants