fix(ci): Don't render config in Dockerfile#155
Merged
Conversation
matthewelwell
approved these changes
Apr 8, 2025
Contributor
matthewelwell
left a comment
There was a problem hiding this comment.
I was initially concerned about this PR as I understood that the hierarchy of settings sources as defined here was an 'all-or-nothing' situation. Based on this, my expectation was that, if someone was using environment variables for their configuration, it should never try to load the config file, and hence we should not log the info message.
In fact, the behaviour is that each setting can use the hierarchy, so we might have some settings that are defined by env vars, and some defined in the config file.
Based on this, I think it is perfectly reasonle to return an empty dictionary for the settings sourced from the config file, if one doesn't exist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #148, we changed the config behaviour so that invalid or missing configurations are rejected with an error. This effectively broke
edge-proxy-render-configwhen called without environment variables, which also broke the Docker build: https://github.com/Flagsmith/edge-proxy/actions/runs/14308473957/job/40097587318Because a config file is no longer required, and we don't need an empty/placeholder config file to show a useful error message, we now don't render a config file at all in the Docker build. If the config file is not found, we now log a message and don't fail with an error. This does not break customers who are mounting/copying their config file into the Edge Proxy container.
This is what running the container with no environment variables or config files looks like now: