File-based Snouty configuration#128
Open
jeskew wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
@claude review |
330a0d9 to
d510112
Compare
Member
|
main review:
|
…ure everything that was previously reading from the environment is going through the new config system
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.
Closes #120
This PR adds support for reading configuration from two locations on disk in addition to the currently supported environment variables. All access to configuration is routed through a
SnoutyConfigvalue that will try to source the tenant and container repository from the following locations on disk if theANTITHESIS_TENANTorANTITHESIS_REPOSITORYenvironment variables are not set:<project configuration directory>/snoutyconfig.toml$XDG_CONFIG_HOME/snouty/settings.toml/$HOME/Library/Application Support/com.Antithesis.Snouty/settings.tomlThe first item is only supported for commands where the user is supplying a directory with a
docker-compose.yamlfile or kubernetes manifests, and the second item is in the global snouty config directory (as identified by thedirectories-nextcrate).Both files have the same format, which looks like:
Snouty will use the top-level
tenant/repositoryvalues unless a profile is supplied via theANTITHESIS_PROFILEenvironment variable. When we add OAuth support to Snouty, any requisite configuration will come from these files. API keys and basic auth are not supported via the config files, as those values are sensitive and thus shouldn't appear in a plaintext config file.One thing I want to add that is not included in this PR is a
snouty initcommand that will prompt the user for values and then write out config files for them. This PR was just feeling a bit large without it added, so I thought it made sense to split it out.