-
Notifications
You must be signed in to change notification settings - Fork 606
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(rollup, coordinator, bridge-history-api): Allow Environment Variables to override config.json #1489
Conversation
BTW, what's the rationale of scroll-sdk needing ENV ? since there are some many options for rollup_realyer and gas_oracle |
Adjusted prefix to SCROLL_ROLLUP to not be SDK specific. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1489 +/- ##
===========================================
- Coverage 52.52% 52.20% -0.32%
===========================================
Files 156 156
Lines 12528 12607 +79
===========================================
+ Hits 6580 6582 +2
- Misses 5382 5457 +75
- Partials 566 568 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
cffcf37
to
7dc8b83
Compare
This reverts commit 7dc8b83.
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Purpose or design rationale of this PR
The goal is to allow services 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_[SERVICE]_
.Sensitive values include:
SCROLL_ROLLUP_DB_CONFIG_DSN
SCROLL_ROLLUP_L1_CONFIG_RELAYER_CONFIG_GAS_ORACLE_SENDER_PRIVATE_KEY
SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_GAS_ORACLE_SENDER_PRIVATE_KEY
SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_COMMIT_SENDER_PRIVATE_KEY
SCROLL_ROLLUP_L2_CONFIG_RELAYER_CONFIG_FINALIZE_SENDER_PRIVATE_KEY
SCROLL_BRIDGE_HISTORY_DB_DSN
SCROLL_BRIDGE_HISTORY_REDIS_PASSWORD
SCROLL_COORDINATOR_AUTH_SECRET
SCROLL_COORDINATOR_DB_DSN
I have not run this code in the Scroll SDK stack, and only a minimal test has been run to see if it works. This at least shows the string is being used as though it came from the JSON file.
Edited to include additional services.
Also see:
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:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?