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

Refactor runtime config #7119

Merged
merged 3 commits into from
Mar 27, 2023
Merged

Refactor runtime config #7119

merged 3 commits into from
Mar 27, 2023

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Mar 21, 2023

Motivation

A lot of patterns in runtime config

Changelog

Define common functions to parse integer, time and boolean env variables from runtime config.
Docs update in blockscout/docs#128

Chore: Rename all "helpers" modules to singular ("helper").

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-refactor-runtime-config branch 10 times, most recently from 8625fad to a2271c5 Compare March 21, 2023 19:55
@vbaranov vbaranov force-pushed the vb-refactor-runtime-config branch 4 times, most recently from 75c82c6 to adc7162 Compare March 21, 2023 22:27
Copy link
Collaborator

@sl1depengwyn sl1depengwyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be replaced with parse_time_env_var?

Also in some places we explicitly set nil as default value for System.get_env but in majority of cases we leave it as a default argument, I suggest to stick to one solution for consistency and either remove explicit nils or add them everywhere

config/runtime.exs Outdated Show resolved Hide resolved
@vbaranov vbaranov added the wip label Mar 22, 2023
@vbaranov vbaranov force-pushed the vb-refactor-runtime-config branch 9 times, most recently from 2f64759 to c76e8e1 Compare March 22, 2023 16:15
@vbaranov vbaranov force-pushed the vb-refactor-runtime-config branch 2 times, most recently from 523e6ed to 6ca3e3e Compare March 22, 2023 20:23
@vbaranov vbaranov removed the wip label Mar 22, 2023
@vbaranov vbaranov force-pushed the vb-refactor-runtime-config branch 11 times, most recently from 877ead9 to bbcecf5 Compare March 26, 2023 21:23
@vbaranov vbaranov merged commit c6decf3 into master Mar 27, 2023
@vbaranov vbaranov deleted the vb-refactor-runtime-config branch March 27, 2023 14:40
fx0x55 pushed a commit to FunctionX/blockscout that referenced this pull request May 10, 2023
* Refactor runtime config

* Process reviewer comments

* Invalidate GA cache

(cherry picked from commit c6decf3)
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.

None yet

3 participants