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

chore(architecture): Remove resolver from context #4752

Merged
merged 5 commits into from
Oct 30, 2020

Conversation

jszwedko
Copy link
Member

Fixes #4749

Conversation: #4685

This removes injection of the Resolver type via TransformContext and SinkContext. As this was the only field for TransformContext, I dropped that type.

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
Removing the Resolver made it superfluous

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@@ -187,7 +187,7 @@ impl SinkConfig for CloudwatchLogsSinkConfig {
let log_group = self.group_name.clone();
let log_stream = self.stream_name.clone();

let client = self.create_client(cx.resolver())?;
let client = self.create_client(dns::Resolver)?;
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't need to happen as part of this PR, but it'd be nice to keep pushing this down to the point where it's actually used and get rid of the readability overhead of the threading entirely.

To where it is used

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko
Copy link
Member Author

@lukesteensen I pushed it all the way down in the last commit if you want to take a peek 👀

Copy link
Member

@lukesteensen lukesteensen left a comment

Choose a reason for hiding this comment

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

Nice!

@jszwedko jszwedko merged commit b036f34 into master Oct 30, 2020
@jszwedko jszwedko deleted the remove-resolver-from-context branch October 30, 2020 20:18
mengesb pushed a commit to jacobbraaten/vector that referenced this pull request Dec 9, 2020
* Remove Resolver from SinkContext

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>

* Remove TransformContext

Removing the Resolver made it superfluous

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>

* Push dns::Resolver further down the stack

To where it is used

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
Signed-off-by: Brian Menges <brian.menges@anaplan.com>
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.

Remove Resolver from TransformContext and SinkContext
2 participants