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

feat: add DNS interceptor #3490

Merged
merged 17 commits into from
Sep 26, 2024
Merged

feat: add DNS interceptor #3490

merged 17 commits into from
Sep 26, 2024

Conversation

metcoder95
Copy link
Member

@metcoder95 metcoder95 commented Aug 21, 2024

Closes #3350

WIP

  • TTL handling
  • Limit max items cached
  • Housekeeping: Improve default distribution handling
  • Housekeeping: Tests

@metcoder95
Copy link
Member Author

It is on a super early state, but should be ok to review @ronag

Please ignore my mess on the distribution and other boilerplate code, I'll improve that later

ronag

This comment was marked as outdated.

@ronag
Copy link
Member

ronag commented Aug 21, 2024

I'm super busy this month. Will do my best to provide feedback. But for now I mostly have time for high level feedback. LGTM so far.

@metcoder95
Copy link
Member Author

We can improve the caching with a self made LRU if we want, but I'd rather explore that in further PRs

lib/interceptor/dns.js Outdated Show resolved Hide resolved
lib/interceptor/dns.js Outdated Show resolved Hide resolved
lib/interceptor/dns.js Outdated Show resolved Hide resolved
@metcoder95 metcoder95 marked this pull request as ready for review September 11, 2024 10:34
@metcoder95
Copy link
Member Author

I'll be fixing the tests down the path; hopefully the Windows one are easier to fix

@mcollina
Copy link
Member

CI does not seem happy

@metcoder95
Copy link
Member Author

I'm intrigued about the Ubuntu ones, but the Window's ones seem odd. I'll check them throughout the week

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@metcoder95
Copy link
Member Author

are we good to merge?

@metcoder95 metcoder95 merged commit bebe53c into main Sep 26, 2024
38 checks passed
@metcoder95 metcoder95 deleted the feat/dns-cache branch September 26, 2024 10:48
Copy link
Contributor

The backport to v6.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-v6.x v6.x
# Navigate to the new working tree
cd .worktrees/backport-v6.x
# Create a new branch
git switch --create backport-3490-to-v6.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 bebe53c396e55dceda23109277ef578a90e3b27e
# Push it to GitHub
git push --set-upstream origin backport-3490-to-v6.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-v6.x

Then, create a pull request where the base branch is v6.x and the compare/head branch is backport-3490-to-v6.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dns round-robin interceptor + cache
4 participants