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

refactor(oohelperd,netmx): reduce construction diff to zero #1467

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

bassosimone
Copy link
Contributor

This diff modifies how we construct oohelperd.Handler inside the oohelperd package and inside the netemx package such that we're now constructing using equivalent code. We know that construction is equivalent for HTTP clients because previosuly we made sure it was the case in #1464.

So, the next step would be removing the custom construction code inside of netemx and always use oohelperd.NewHandler.

In turn, by doing this, we would ensure we have the same oohelperd behavior for QA and production.

In turn, with this guarantee, we can write QA tests that ensure we're correctly dealing with 127.0.0.1.

The reference issue is ooni/probe#1517.

This diff modifies how we construct oohelperd.Handler inside the
oohelperd package and inside the netemx package such that we're now
constructing using equivalent code. We know that construction is
equivalent for HTTP clients because previosuly we made sure it was
the case in #1464.

So, the next step would be removing the custom construction code
inside of netemx and always use oohelperd.NewHandler.

In turn, by doing this, we would ensure we have the same `oohelperd`
behavior for QA and production.

In turn, with this guarantee, we can write QA tests that ensure we're
correctly dealing with 127.0.0.1.

The reference issue is ooni/probe#1517.
@bassosimone bassosimone merged commit 8331a30 into master Jan 24, 2024
11 checks passed
@bassosimone bassosimone deleted the issue/1517e branch January 24, 2024 10:32
bassosimone added a commit that referenced this pull request Jan 24, 2024
In #1467 we made the netemx
constructor for oohelperd.Handler equivalent to oohelperd.NewHandler.

So, now it becomes possible to always use oohelperd.NewHandler.

While there, notice that we can make all the Handler fields private
because there's no need to share them anymore, so do that.

Having done this, we are now sure we have the same `oohelperd`
behavior for QA and production.

In turn, with this guarantee, we can write QA tests that ensure we're
correctly dealing with 127.0.0.1.

The reference issue is ooni/probe#1517.
bassosimone added a commit that referenced this pull request Jan 24, 2024
In #1467 we made the netemx
constructor for oohelperd.Handler equivalent to oohelperd.NewHandler.

So, now it becomes possible to always use oohelperd.NewHandler.

While there, notice that we can make all the Handler fields private
because there's no need to share them anymore, so do that.

Having done this, we are now sure we have the same `oohelperd` behavior
for QA and production.

In turn, with this guarantee, we can write QA tests that ensure we're
correctly dealing with 127.0.0.1.

The reference issue is ooni/probe#1517.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this pull request Feb 13, 2024
This diff modifies how we construct oohelperd.Handler inside the
oohelperd package and inside the netemx package such that we're now
constructing using equivalent code. We know that construction is
equivalent for HTTP clients because previosuly we made sure it was the
case in ooni#1464.

So, the next step would be removing the custom construction code inside
of netemx and always use oohelperd.NewHandler.

In turn, by doing this, we would ensure we have the same `oohelperd`
behavior for QA and production.

In turn, with this guarantee, we can write QA tests that ensure we're
correctly dealing with 127.0.0.1.

The reference issue is ooni/probe#1517.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this pull request Feb 13, 2024
…i#1468)

In ooni#1467 we made the netemx
constructor for oohelperd.Handler equivalent to oohelperd.NewHandler.

So, now it becomes possible to always use oohelperd.NewHandler.

While there, notice that we can make all the Handler fields private
because there's no need to share them anymore, so do that.

Having done this, we are now sure we have the same `oohelperd` behavior
for QA and production.

In turn, with this guarantee, we can write QA tests that ensure we're
correctly dealing with 127.0.0.1.

The reference issue is ooni/probe#1517.
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.

1 participant