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

feat: Allow Environment Variables to override config.json #125

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

dghelm
Copy link
Contributor

@dghelm dghelm commented Aug 21, 2024

Purpose or design rationale of this PR

The goal is to allow the service to be configured using environmental variables (in addition to the config.json file). This facilitates contexts like Kubernetes, where you want Secrets managed independently from the non-sensitive config information (say, loaded from AWS Secrets).

Here, variables are prefixed with SCROLL_CHAIN_MONITOR_.

For more info and context, see scroll-tech/scroll#1489

Sensitive values include:

  • SCROLL_CHAIN_MONITOR_DB_CONFIG_DSN

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.82%. Comparing base (5accd3b) to head (972fbd1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #125   +/-   ##
=======================================
  Coverage   40.82%   40.82%           
=======================================
  Files           5        5           
  Lines         605      605           
=======================================
  Hits          247      247           
  Misses        349      349           
  Partials        9        9           
Flag Coverage Δ
chain-monitor 40.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dghelm dghelm requested a review from georgehao August 21, 2024 16:41
colinlyguo
colinlyguo previously approved these changes Aug 21, 2024
@dghelm dghelm merged commit 5d5f457 into main Aug 22, 2024
4 checks passed
@dghelm dghelm deleted the feat-use-envvar-for-config-override branch August 22, 2024 17:17
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.

2 participants