-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only load config and rules once (#1470)
## Which problem is this PR solving? We found an issue where refinery, as part of its config load process on startup or reload, would load the config/rules (whether from file or http or any), multiple times. This was happening because we the config data was passed around as a reader and if we ever needed the data a second time (which we do for validation vs unmarshaling into config) we had to go get another reader. ## Short description of the changes - updates `newFileConfig` to first grab the data of all config locations and the use this data for all validation and unmarshalling. This prevents `newFileConfig` from needing to grab the data multiple times - updated some unit tests, but most needed unchanged. --------- Co-authored-by: Yingrong Zhao <22300958+VinozzZ@users.noreply.github.com>
- Loading branch information
1 parent
70ca257
commit 570b6c2
Showing
3 changed files
with
96 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters