Repository navigation
xatu: replace ${VAR} placeholders in --xatu.config with environment variables - #44
Conversation
…ariables
Move to execution-processor v0.6.0 and load the config through its
config.UnmarshalWithEnv, so credentials in it can come from the
environment: ${VAR} takes the value of VAR and fails startup when it is
unset or empty, and ${VAR:-default} falls back to the default.
Placeholders are replaced in parsed values, so a config without them
loads as before.
Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
There was a problem hiding this comment.
This PR bumps execution-processor to v0.6.0 and swaps the xatu config loader from yaml.Unmarshal to config.UnmarshalWithEnv so ${VAR}/${VAR:-default} placeholders in --xatu.config resolve from the environment, with a matching README note. The call site now mirrors upstream's own loadServerConfigFromFile (defaults.Set, type plain, UnmarshalWithEnv, Validate), the removed yaml import is unused at head, the v0.5.1→v0.6.0 compare shows only the new env.go and cmd changes (no API or go.mod churn), and OSV reports no vulnerabilities for the Go module at 0.6.0. I found no real problems.
Reviewed 3 changed file(s) @ 20bd0514 — no blocking issues found.
"If you're not embarrassed by the first version, you launched too late." — Reid Hoffman
Docker Image Built (v3.8.1)Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub: Repository:
Usagedocker pull ethpandaops/erigone:pr-44-20bd051-v3.8.1
docker run ethpandaops/erigone:pr-44-20bd051-v3.8.1 --help |
Docker Image Built (v3.7.1)Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub: Repository:
Usagedocker pull ethpandaops/erigone:pr-44-20bd051-v3.7.1
docker run ethpandaops/erigone:pr-44-20bd051-v3.7.1 --help |
Docker Image Built (v3.7.0)Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub: Repository:
Usagedocker pull ethpandaops/erigone:pr-44-20bd051-v3.7.0
docker run ethpandaops/erigone:pr-44-20bd051-v3.7.0 --help |
Docker Image Built (v3.8.0)Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub: Repository:
Usagedocker pull ethpandaops/erigone:pr-44-20bd051-v3.8.0
docker run ethpandaops/erigone:pr-44-20bd051-v3.8.0 --help |
Docker Image Built (v3.3.10)Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub: Repository:
Usagedocker pull ethpandaops/erigone:pr-44-20bd051-v3.3.10
docker run ethpandaops/erigone:pr-44-20bd051-v3.3.10 --help |
Placeholders that expand to null, such as null or ~, stay strings. Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
CI failed @
|
Moves to execution-processor v0.6.1 and loads
--xatu.configthrough itsconfig.UnmarshalWithEnv(ethpandaops/execution-processor#115, ethpandaops/execution-processor#116), so credentials in the config can come from the environment instead of being written into the file:${VAR}takes the value ofVARand fails startup, naming the variable, when it is unset or empty, and${VAR:-default}falls back to the default. Placeholders are replaced in parsed YAML values, so values arrive exactly as set and a config without placeholders loads as before; the README's Run section documents it.