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

fix(connlib): exclude sentinel dns range for resources ips #4200

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

conectado
Copy link
Collaborator

@conectado conectado commented Mar 18, 2024

In the future we will want to refactor this to a builder pattern to prevent the number of parameters from growing and have them clearer but this works simply for now.

Found while discussing #4174

Copy link

vercel bot commented Mar 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
firezone ⬜️ Ignored (Inspect) Visit Preview Mar 18, 2024 11:52pm

Copy link

github-actions bot commented Mar 18, 2024

Terraform Cloud Plan Output

Plan: 9 to add, 8 to change, 9 to destroy.

Terraform Cloud Plan

Copy link
Member

@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

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

LGTM, deferring to @thomaseizinger

Copy link

github-actions bot commented Mar 18, 2024

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 229.1 MiB (+0%) 230.1 MiB (+0%) 151 (-10%)
direct-tcp-server2client 235.1 MiB (-0%) 236.3 MiB (-1%) 364 (+1%)
relayed-tcp-client2server 149.2 MiB (+1%) 150.0 MiB (+1%) 187 (+42%)
relayed-tcp-server2client 163.2 MiB (+1%) 163.5 MiB (+1%) 158 (-9%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 50.0 MiB (+0%) 0.04ms (-39%) 0.00% (NaN%)
direct-udp-server2client 50.0 MiB (+0%) 0.01ms (+14%) 0.00% (NaN%)
relayed-udp-client2server 50.0 MiB (-0%) 0.11ms (+1%) 0.00% (NaN%)
relayed-udp-server2client 50.0 MiB (+0%) 0.05ms (+11%) 0.00% (NaN%)

Copy link
Member

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

If you are always passing constants, why don't you just make two constructors that use those constants internally?

Seems to be easier to understand to me.

Also, can IpProvider just move into firezone_tunnel? Why does it sit in shared?

@conectado
Copy link
Collaborator Author

To be honest I still prefer passing the ranges in the constructor, seems more explicit to me.

@conectado conectado force-pushed the fix/exclude-sentinel-dns-routes-for-resources branch from f05f208 to 61aafc7 Compare March 18, 2024 22:50
@thomaseizinger
Copy link
Member

To be honest I still prefer passing the ranges in the constructor, seems more explicit to me.

It is just a level of indirection though. Unless we use it with dynamic ranges, it seems to make more sense to just make two constructors:

impl IpProvider {
	fn client() -> Self { }
	fn gateway() -> Self { }
}

@thomaseizinger
Copy link
Member

To be honest I still prefer passing the ranges in the constructor, seems more explicit to me.

It is just a level of indirection though. Unless we use it with dynamic ranges, it seems to make more sense to just make two constructors:

You can always dispatch to a more generic constructor from there.

@conectado conectado added this pull request to the merge queue Mar 19, 2024
@thomaseizinger
Copy link
Member

To be honest I still prefer passing the ranges in the constructor, seems more explicit to me.

It is just a level of indirection though. Unless we use it with dynamic ranges, it seems to make more sense to just make two constructors:

impl IpProvider {
	fn client() -> Self { }
	fn gateway() -> Self { }
}

Oh I misunderstand how this is used. Nvm the client / gateway terminology.

Merged via the queue into main with commit 9f850bb Mar 19, 2024
137 checks passed
@conectado conectado deleted the fix/exclude-sentinel-dns-routes-for-resources branch March 19, 2024 00:20
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

3 participants