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 unintended environment variable config passthrough to services #540

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Dec 22, 2023

What

Run supervisord in a new environment that doesn't inherit the shell.

Why

Supervisord and its subprocesses inherit the shell's environment variables.

This is problematic since environment variables are a shared space and there's no guarantee that setting an environment variable would make sense for all sub processes.

We have a case where this has caused problems. The quickstart image uses the NETWORK environment variable, and so does Horizon. For the longest time we have had issues running the quickstart image in certain situations, and it turns out what those situations had in common was they were setting the network of the image via an environment variable NETWORK to a value that worked with the quickstart image start script but didn't work with Horizon. Some values worked for both, some didn't.

We should set environment variables for services explicitly, not broadly based on what the images env vars are.

This will allow us to use the quickstart image as a service in GitHub Actions where it must be configured using env vars,
and anywhere folks are already configuring it with env vars.

Close #541

@leighmcculloch leighmcculloch deleted the matronhood-deringa branch December 22, 2023 01:57
@leighmcculloch leighmcculloch restored the matronhood-deringa branch December 22, 2023 02:25
@leighmcculloch leighmcculloch changed the title Support configuring network via env var Testing Dec 22, 2023
@leighmcculloch leighmcculloch changed the title Testing Fix unintended environment variable config passthrough to services Jan 3, 2024
Copy link

@chadoh chadoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Great find! Thanks!

@leighmcculloch leighmcculloch merged commit cbdb783 into master Jan 3, 2024
85 checks passed
@leighmcculloch leighmcculloch deleted the matronhood-deringa branch January 3, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails to start as a GitHub Action Service
3 participants