-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a required field to configuration options at Config.toml #287
Comments
Could you not do |
Maybe, is that always the case? Not all required fields have a default value, right? For ex., the DAPP_CONTRACT_ADDRESS. |
I reviewed the variables, and there is a case where it gets a little complicated. The user must set either the |
One way I like to solve this is defining a precedence. AUTH_AWS > AUTH_MNEMONIC_FILE > AUTH_MNEMONIC At least one of them should be defined since AUTH_* is required. If all (or some) are defined, the greater is used. |
I found another situation that would make it harder to handle in the TOML config itself.
Am I right? |
The required rules are only fully checked inside the Go code. In that sense, we could write a Go executable that checks if the envs you will set constitute a valid config. That may be a bit much though. |
helm uses go template, maybe if we desire to have this logic defined within the Config.toml itself we could do something like this:
NOTE: The template logic is probably wrong, it's just an example. The Then you can use this in the rollups-node go code and I can use the same logic within helm template or from the generator script. |
That is a lot of engineering just for helping helm-chart users. I favor just running the node and checking whether it works. |
📚 Context
First of all, that's great that there's a structured file where we can get reliable information about all the configuration options that control the rollups-node, kudos for that. :
At the rollups-node helm chart code, we're using this file (Config.toml) to generated the helm
values.yaml
configurations options programmatically, and we could alert the helm user that some configuration is not valid without having to wait the rollups-node start and only see that it will fail at the logs.So I request that we have a
required: bool
field for the configuration parameters that doesn't have a default value.With that, we could fail during the helm template generation avoiding the user to deploy an invalid rollups-node configuration.
✔️ Solution
Add a
required: true
field for rollups-node configurations that are required. 🙄The text was updated successfully, but these errors were encountered: