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

Adapt Livebook's runtime configuration for Meadow #3734

Draft
wants to merge 2 commits into
base: deploy/staging
Choose a base branch
from

Conversation

mbklein
Copy link
Contributor

@mbklein mbklein commented Dec 21, 2023

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

  • Remove hush and hush_aws_secretsmanager dependencies
  • Create Meadow.Runtime module with convenience functions for retrieving AWS and environment secrets
  • Create modules for the same kind of hierarchical runtime config that config/*.exs does for compile-time config:
    • Meadow.Runtime.Config
    • Meadow.Runtime.{Dev, Test, Prod}
    • Meadow.Runtime.Release
    • Meadow.Runtime.Pipeline
  • Minimal updates to lib and test code to account for the new runtime config (mostly the disappearance of Hush)
  • Update to ueberauth_nusso v2.0.0 to support a split between compile-time Ueberauth config and runtime Ueberauth strategy config

Version bump required by the PR

See Semantic Versioning 2.0.0 for help discerning which is required.

  • Patch
  • Minor
  • Major

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 production

  • Backward compatible API changes
    • Database Schema changes
    • GraphQL API
    • Elasticsearch API
    • Ingest Sheet
    • CSV metadata export/update API
    • Shared Links export API
  • Backwards-incompatible API changes
    • Database Schema changes
    • GraphQL API
    • Elasticsearch API
    • Ingest Sheet
    • CSV metadata export/update API
    • Shared Links export API
  • Requires data migration
  • Requires database triggers disabled during deployment/migration
  • Requires reindex
  • Terraform changes
    • Adds/requires new or changed Terraform variables
  • Pipeline configuration changes (requires mix meadow.pipeline.setup run)
  • Requires new variable added to miscellany
  • Specific deployment synchronization instructions with other apps/API's
  • Other specific instructions/tasks

Tested/Verified

  • End users/stakeholders

@mbklein mbklein force-pushed the runtime-configuration branch from 4abb4f5 to 0711486 Compare December 21, 2023 22:41
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.

1 participant