cartesi / rollups

Cartesi Rollups
30 stars 12 forks source link

Remove enable flag for healthcheck and metrics #165

Closed gligneul closed 1 year ago

gligneul commented 1 year ago

📚 Context

This flag is not working properly.

Here is the error in the services with only the health check:

error: unexpected value 'false' for '--healthcheck-enabled' found; no more were expected

Clap treats the argument as a flag, and since it is already true, we cannot disable it in the CLI. The ENV option works as expected tough.

The dispatcher has another error with Clap. The default is set to true, but it doesn't recognize it and gives the following error:

thread 'main' panicked at 'Mismatch between definition and access of `healthcheck_enabled`. Unknown argument or group id.  Make sure you are using the argument id and not the short or long flags

✔️ Solution

Disabling the health check and the metrics is not essential to running the node. If the node runner doesn't want to use these features, he can just ignore them. If the runner needs to solve a port conflict, they may change the used port.

gligneul commented 1 year ago

@endersonmaia @cartesi/node-unit FYI