-
Notifications
You must be signed in to change notification settings - Fork 109
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
Prevent config rendering on every process #3011
base: main
Are you sure you want to change the base?
Conversation
64265cd
to
16d7df1
Compare
…date_env() instead
1affb5f
to
2aa9588
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small stuff.
So if we save the config to an env var, we don't get the templating breaking on get_env
secondary calls? Since we only do it once, is that what this PR is solving?
@meowjesty That's correct - the config template variables get resolved when the config file is rendered by Tera, which previously happened on every process. This causes an issue when a process tries to, for example, call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would check mirrord container
due to changes to MIRRORD_CONNECT_TCP_ENV
in exec, it should work but I would double check
mirrord/cli/src/execution.rs
Outdated
MIRRORD_CONNECT_TCP_ENV.to_string(), | ||
format!("127.0.0.1:{}", address.port()), | ||
); | ||
let mut config = config.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im a bit worried for container feature behaviour where we split up the env variables for sidecar and main container relying on MIRRORD_CONNECT_TCP_ENV
as env value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt it get passed through by the config anyway? the only time the env var is accessed is when a new config is created so the value should already be in there, right? you're right, there are definitely issues with config calculation - i think the container command relies pretty heavily on the config being re-calculated a few times, so it may have to be done manually
Closes #2936