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

enable trust-dns feature for reqwest crate for more reliable dns resolution #2323

Closed

Conversation

reubenmiller
Copy link
Contributor

@reubenmiller reubenmiller commented Oct 6, 2023

Proposed changes

Use trust-dns feature of the request crate to improve the robustness to invalid DNS nameservers.

TODO:

  • Add system tests to replicate invalid DNS nameservers
  • State advantages for using tedge-dns
  • Check if the added dependencies is ok
  • Check if there are some other subtle negative impacts of this change, or if a different retry error makes more sense

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

#2321

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

…lution

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller temporarily deployed to Test Pull Request October 6, 2023 06:26 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
312 0 3 312 100 53m14.577999999s

@@ -110,7 +110,7 @@ quote = "1"
rand = "0.8"
rcgen = { version = "0.9", features = ["pem", "zeroize"] }
regex = "1.4"
reqwest = { version = "0.11", default-features = false }
reqwest = { version = "0.11", default-features = false, features = ["trust-dns"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

This reqwest crate is used only by a few crates in our repo like the downloader crate. The major ones like c8y_http_proxy use hyper directly. So, this might only partially solve the problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There seems to be some support for hyper and trust-dns:

But yes we should do a more comprehensive assessment so that it is consistent.

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

2 participants