Adapt Livebook's runtime configuration for Meadow #3734
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.
Summary
The
Hush
module made our configuration super complicated, and resulted in near constant compilation and runtime warnings about redefining modules. Livebook uses a pretty good pattern for runtime configuration that I've tried to replicate here. It was tricky managing different environments that all have some level of dynamic/runtime config, or whose configuration might be overwritten by the top-level runtime config, but I think I came up with a reasonable middle ground. It's still a departure from standard Elixir practice, but it's better than it was.Specific Changes in this PR
hush
andhush_aws_secretsmanager
dependenciesMeadow.Runtime
module with convenience functions for retrieving AWS and environment secretsconfig/*.exs
does for compile-time config:Meadow.Runtime.Config
Meadow.Runtime.{Dev, Test, Prod}
Meadow.Runtime.Release
Meadow.Runtime.Pipeline
lib
andtest
code to account for the new runtime config (mostly the disappearance ofHush
)ueberauth_nusso
v2.0.0 to support a split between compile-time Ueberauth config and runtime Ueberauth strategy configVersion bump required by the PR
See Semantic Versioning 2.0.0 for help discerning which is required.
Steps to Test
Just run it and make sure everything's behaving, and look over the new config modules to make sure we all understand where any new/changed config would go.
🚀 Deployment Notes
Note - if you check any of these boxes go to the (always open)
main
<-staging
PR and add detailed notes and instructions to help out others who may end up deploying your changes to productionmix meadow.pipeline.setup
run)miscellany
Tested/Verified