Skip to content
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

fix(holesky): entrypoint logic to not replace envs when empty #545

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions bolt-sidecar/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use telemetry::TelemetryOpts;
/// Operating limits for commitments and constraints.
pub mod limits;
use limits::LimitsOpts;
use tracing::debug;

use crate::common::secrets::{BlsSecretKeyWrapper, EcdsaSecretKeyWrapper, JwtSecretConfig};

Expand Down Expand Up @@ -144,7 +143,6 @@ fn remove_empty_envs() -> eyre::Result<()> {
for item in env::vars() {
let (key, val) = item;
if val.trim().is_empty() {
debug!("removing empty env var: {}", key);
std::env::remove_var(key)
}
}
Expand Down
10 changes: 5 additions & 5 deletions testnets/holesky/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ source .env
# Override some of the environment variables provided by the user, even if
# provided via .env file, so that the volume mounts work as expected.
#
# The "+" syntax replaces the environment variable with the alternate valuee
# only if set.
# The ":+" syntax replaces the environment variable with the alternate value
# only if set _and_ not empty.
# Reference: https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#interpolation-syntax
#
# Ensure these environment variables are either empty or set with the
# alternative values, overriding what's provided with the `--env-file` flag in
# the Docker Compose file and matching the volume mounts.
export BOLT_SIDECAR_DELEGATIONS_PATH="${BOLT_SIDECAR_DELEGATIONS_PATH+/etc/delegations.json}"
export BOLT_SIDECAR_KEYSTORE_PATH="${BOLT_SIDECAR_KEYSTORE_PATH+/etc/keystore}"
export BOLT_SIDECAR_KEYSTORE_SECRETS_PATH="${BOLT_SIDECAR_KEYSTORE_SECRETS_PATH+/etc/secrets}"
export BOLT_SIDECAR_DELEGATIONS_PATH="${BOLT_SIDECAR_DELEGATIONS_PATH:+/etc/delegations.json}"
export BOLT_SIDECAR_KEYSTORE_PATH="${BOLT_SIDECAR_KEYSTORE_PATH:+/etc/keystore}"
export BOLT_SIDECAR_KEYSTORE_SECRETS_PATH="${BOLT_SIDECAR_KEYSTORE_SECRETS_PATH:+/etc/secrets}"

./bolt-sidecar
Loading