Merge branch 'fixHealth' into 'main'

Fix health

See merge request v3/service/ad!16
This commit is contained in:
Sylvain Briat 2023-07-18 15:28:53 +00:00
commit 41cb3731c6
5 changed files with 26 additions and 8 deletions

View File

@ -19,7 +19,7 @@ test:
- docker-compose -f docker-compose.ci.tools.yml -p ad-tools --env-file ci/.env.ci up -d
- sh ci/wait-up.sh
- docker-compose -f docker-compose.ci.service.yml -p ad-service --env-file ci/.env.ci up -d
# - docker exec -t v3-ad-api sh -c "npm run test:integration:ci"
- docker exec -t v3-ad-api sh -c "npm run test:integration:ci"
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@mobicoop/ad",
"version": "1.1.0",
"version": "1.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@mobicoop/ad",
"version": "1.1.0",
"version": "1.1.1",
"license": "AGPL",
"dependencies": {
"@grpc/grpc-js": "^1.8.14",

View File

@ -1,6 +1,6 @@
{
"name": "@mobicoop/ad",
"version": "1.1.0",
"version": "1.1.1",
"description": "Mobicoop V3 Ad",
"author": "sbriat",
"private": true,

21
src/health.proto Normal file
View File

@ -0,0 +1,21 @@
syntax = "proto3";
package health;
service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
}
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
}
ServingStatus status = 1;
}

View File

@ -14,10 +14,7 @@ async function bootstrap() {
package: ['ad', 'health'],
protoPath: [
join(__dirname, 'modules/ad/interface/grpc-controllers/ad.proto'),
join(
__dirname,
'modules/health/interface/grpc-controllers/health.proto',
),
join(__dirname, 'health.proto'),
],
url: `${process.env.SERVICE_URL}:${process.env.SERVICE_PORT}`,
loader: { keepCase: true },