refactor: pass in config as dependency instead of self initializing
What does this merge request do and why?
In !1590 (merged), we introduced the region
field to the Snowplow context. It is currently resolved by directly instantiating Config
. It was noted in !1590 (comment 2205752321) that this has an undesirable side effect (ie. reading .env
file).
This MR addresses the suggestion in !1590 (comment 2205904796) to refactor the code so that config
is passed in as a dependency argument.
Resolves #739 (closed).
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Merge request reports
Activity
changed milestone to %17.9
assigned to @lma-git
added Category:Code Suggestions devopscreate sectiondev labels
Reviewer roulette
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Reviewer Maintainer @jfypk
(UTC+0, 8 hours ahead of author)
@bcardoso-
(UTC+1, 9 hours ahead of author)
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by ****- Resolved by Bruno Cardoso
Hi @ck3g! Could you please do the initial review here? Please pass onto a maintainer if it looks okay to you. Thanks!
requested review from @ck3g
requested review from @bcardoso-
started a merge train
mentioned in commit ebf89a49