From bfc626d27680c7877f64754793a0507197ff8006 Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Wed, 27 Nov 2024 09:03:08 +0100 Subject: [PATCH 1/2] [docs-only] Update the new service checklist --- docs/services/general-info/new-service-checklist.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/services/general-info/new-service-checklist.md b/docs/services/general-info/new-service-checklist.md index 2640ca8c1..33a176ee1 100644 --- a/docs/services/general-info/new-service-checklist.md +++ b/docs/services/general-info/new-service-checklist.md @@ -24,13 +24,15 @@ Use this checklist with copy/paste in your PR - right from the beginning. It ren bad `` good `` - [ ] If new CLI commands are introduced, those commands must be described in the README.md. + - Commands are added to `ocis/pkg/command` - [ ] If new global envvars are introduced, the name must start with `OCIS_`. - [ ] Add the service to the makefile in the ocis repo root. -- [ ] Make the service startable for binary and individual startup: - - For single binary add service to `ocis/pkg/runtime` - - For individual startup add service to `ocis/pkg/commands` +- [ ] Service startup: + - For automatic startup: `ocis/pkg/runtime` (service/service.go) + - Exclude from automatic startup, add it to the `populate optional services` block - Add the service config to `ocis-pkg/config/defaultconfig.go` - [ ] If the service is using service accounts, add it to `ocis/pkg/init/init.go` +- [ ] Check that the service properly responds to `ocis health` and has `/healthz` and `/readyz` endpoints - [ ] Add the service to `.drone.star` to enable CI. - [ ] Inform doc team in an *early stage* to review the readme AND the environment variables created. - The description must reflect the behaviour AND usually has a positive code quality impact. @@ -45,4 +47,5 @@ Use this checklist with copy/paste in your PR - right from the beginning. It ren - [ ] Add metrics to the code to enable monitoring. See the proxy service for implementation details. - Plus add documentation about monitoring in the README.md file - [ ] When the service requires translations that have to be covered by the service and are not sourced by web, see the [add translation]({{< ref "./add-translations.md" >}}) documentation for more details. +- [ ] If the service requires a `cache` or `store`, check existing services for implementation and add a documentation in the README.md ``` From 47bd5735e48a7755dbdb6aa0a5b9b4bc28183236 Mon Sep 17 00:00:00 2001 From: kobergj Date: Fri, 29 Nov 2024 15:37:39 +0100 Subject: [PATCH 2/2] fix(docs): better service startup explanation Co-authored-by: Martin --- docs/services/general-info/new-service-checklist.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/services/general-info/new-service-checklist.md b/docs/services/general-info/new-service-checklist.md index 33a176ee1..eb72f9ad4 100644 --- a/docs/services/general-info/new-service-checklist.md +++ b/docs/services/general-info/new-service-checklist.md @@ -28,8 +28,11 @@ Use this checklist with copy/paste in your PR - right from the beginning. It ren - [ ] If new global envvars are introduced, the name must start with `OCIS_`. - [ ] Add the service to the makefile in the ocis repo root. - [ ] Service startup: - - For automatic startup: `ocis/pkg/runtime` (service/service.go) - - Exclude from automatic startup, add it to the `populate optional services` block + - add it to `ocis/pkg/command/services.go` + - Include for automatic startup: + - add it to `ocis/pkg/runtime/service/service.go` + - Exclude from automatic startup: + - add it to the `populate optional services` block in `ocis/pkg/runtime/service/service.go` - Add the service config to `ocis-pkg/config/defaultconfig.go` - [ ] If the service is using service accounts, add it to `ocis/pkg/init/init.go` - [ ] Check that the service properly responds to `ocis health` and has `/healthz` and `/readyz` endpoints