mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
0ff716df2a
* grpc-definitions: Delete health_service.proto We can use the version in io.grpc:grpc-services instead. * ledger: Delete ledger/API.md. * sandbox: Fix warnings in ApiServices flagged by IntelliJ. * sandbox: Implement a dummy grpc.health.v1.Health.Check endpoint. * sandbox: Implement a dummy grpc.health.v1.Health.Watch endpoint. * sandbox: Drop repeated elements from grpc.health.v1.Health.Watch. * sandbox: Wrap the HealthService in basic tests. * sandbox: Stop streaming the server health too. * ledger-api-test-tool: Health check tests. * Add a changelog entry for the health check endpoints. CHANGELOG_BEGIN - [Ledger API] Add healthcheck endpoints, conforming to the `GRPC Health Checking Protocol <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_. It is always ``SERVING`` for now. - [DAML Ledger Integration Kit] Add conformance test coverage for the ``grpc.health.v1.Health`` service. CHANGELOG_END * ledger-api-integration-tests: Increment the number of services. * Apply suggestions from code review Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com> * sandbox: Use `AkkaBeforeAndAfterAll` in the HealthServiceSpec. In an attempt to get it working on CI. * sandbox: Change `dropRepeated` to `DropRepeated()`. Keep it in one file. * test-common: Use `Delayed.by` in `TimeBoundObserver`. * test-common: Close the source when `TimeBoundObserver` completes. * ./fmt.sh That'll teach me not to `--no-verify` just because it's a merge commit. * sandbox: Inline `HealthService.suppress`. At some point it was being used twice. * sandbox: Increase the timeout for HealthServiceSpec. * sandbox: Reimplement HealthService using the Scala protobuf types. * sandbox: Generate an Akka-compatible trait for the health service. And refactor a lot of test code to make it easy to test. * ledger-api-common: Move the HealthService here. * rs-grpc-testing-utils: Publish to Maven. * rs-grpc-testing-utils: Add Maven coordinates.
108 lines
2.6 KiB
Python
108 lines
2.6 KiB
Python
# Copyright (c) 2019 The DAML Authors. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//rules_daml:daml.bzl",
|
|
"daml_compile",
|
|
)
|
|
load(
|
|
"//bazel_tools:scala.bzl",
|
|
"da_scala_library",
|
|
)
|
|
load(
|
|
"//language-support/scala/codegen:codegen.bzl",
|
|
"dar_to_scala",
|
|
)
|
|
load(
|
|
"//daml-lf/language:daml-lf.bzl",
|
|
"lf_dev_version",
|
|
"lf_latest_version",
|
|
"lf_stable_version",
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "test-common",
|
|
srcs = glob(["src/main/scala/**/*.scala"]),
|
|
visibility = [
|
|
"//visibility:public",
|
|
],
|
|
deps = [
|
|
"//ledger-api/grpc-definitions:ledger-api-scalapb",
|
|
"//libs-scala/timer-utils",
|
|
"@maven//:io_grpc_grpc_api",
|
|
"@maven//:io_grpc_grpc_context",
|
|
"@maven//:io_grpc_grpc_core",
|
|
],
|
|
)
|
|
|
|
daml_compile(
|
|
name = "SemanticTests",
|
|
main_src = "src/main/daml/SemanticTests.daml",
|
|
target = lf_stable_version,
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
dar_to_scala(
|
|
name = "SemanticTests.scala-codegen",
|
|
srcs = [
|
|
":SemanticTests.dar",
|
|
],
|
|
package_prefix = "com.digitalasset.ledger.test",
|
|
srcjar_out = "SemanticTests.scala.srcjar",
|
|
verbosity = 2,
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "SemanticTests.scala",
|
|
srcs = [":SemanticTests.scala-codegen"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//language-support/scala/bindings",
|
|
],
|
|
)
|
|
|
|
lf_test_versions = [
|
|
(lf_stable_version, "stable"),
|
|
(lf_latest_version, "latest"),
|
|
(lf_dev_version, "dev"),
|
|
]
|
|
|
|
[
|
|
[
|
|
daml_compile(
|
|
name = "Test-%s" % target_name,
|
|
main_src = "src/main/daml/Test.daml",
|
|
target = target,
|
|
visibility = ["//visibility:public"],
|
|
),
|
|
dar_to_scala(
|
|
name = "Test-%s.scala-codegen" % target_name,
|
|
srcs = [":Test-%s.dar" % target_name],
|
|
package_prefix = "com.digitalasset.ledger.test_%s" % target_name,
|
|
srcjar_out = "Test-%s.scala.srcjar" % target_name,
|
|
verbosity = 2,
|
|
visibility = ["//visibility:public"],
|
|
),
|
|
da_scala_library(
|
|
name = "Test-%s.scala" % target_name,
|
|
srcs = [":Test-%s.scala-codegen" % target_name],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//language-support/scala/bindings",
|
|
],
|
|
),
|
|
]
|
|
for (target, target_name) in lf_test_versions
|
|
]
|
|
|
|
filegroup(
|
|
name = "dar-files",
|
|
srcs = [
|
|
":SemanticTests.dar",
|
|
":Test-dev.dar",
|
|
":Test-stable.dar",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|