Is it possible to control canton's gRPC health endpoint programmatically?

When starting up PQS in a containerized environment, we need to wait for the upload of specific dars with our application code to the canton participant, before starting the PQS container. Otherwise the schema (tables) will be missing for that particular dar.

For this purpose, I’m wondering if it’s possible to control the gRPC health endpoint of a participant from a bootstrap script? The idea would be to only make it healthy once the dar has been uploaded from the script - this would stall the startup of the PQS container.

Is it possible to control the health endpoints programmatically / from the canton console?

1 Like

Hi Luciano,

Have you considered using an init container to do the dar upload in docker compose and have your PQS service depend on it with the service_completed_successfully condition?

eg. Does docker-compose support init container? - Stack Overflow

1 Like

Thanks Michael for your suggestion. Yes, we also thought of this; discussion here (internal repo). Somebody else also suggested this, so it seems a true and tried solution.
Waiting to see if someone form the canton team has any ideas about overriding the health end-point though.