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

Remove middlewares marked for deletion #2982

Merged
merged 11 commits into from
Jun 15, 2023

Conversation

pacrob
Copy link
Contributor

@pacrob pacrob commented Jun 6, 2023

What was wrong?

Needed checks for whether default middlewares have changed

Related to Issue #2972

How was it fixed?

Added test to check default middlewares

Todo:

Cute Animal Picture

image

@pacrob pacrob force-pushed the test-for-default-middlewares branch 2 times, most recently from aa65be3 to f5e503f Compare June 6, 2023 17:29
Copy link
Collaborator

@fselmo fselmo left a comment

Choose a reason for hiding this comment

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

I know this is still draft but just making a quick comment that a similar test exists. Maybe we combine the ideas in both?

@reedsa reedsa force-pushed the test-for-default-middlewares branch 2 times, most recently from 9e309e5 to c134033 Compare June 7, 2023 21:45
@reedsa reedsa requested a review from fselmo June 7, 2023 21:52
@reedsa reedsa force-pushed the test-for-default-middlewares branch from c134033 to 63b53c3 Compare June 8, 2023 16:14
(validation_middleware, "validation"),
(abi_middleware, "abi"), # Delete
(abi_middleware, "abi"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldnt delete this just yet, removal causes validation errors due to invalid formats (string not converted to hex, etc).
Tests failing in this build without abi_middleware: https://app.circleci.com/pipelines/github/ethereum/web3.py/4559/workflows/8c5fe87f-fe5f-4a45-97ee-8391158c502f/jobs/308436

Copy link
Collaborator

@kclowes kclowes Jun 14, 2023

Choose a reason for hiding this comment

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

This can be a separate PR, but since all of the tests are failing on the eth-tester inbound validation, I suspect there is a bug with either the inbound validation in eth-tester, or with our eth-tester logic that does some type conversions before we send to eth-tester. We should make an issue though to track this removal.

Never mind, just saw that the integration tests are failing too.

@reedsa reedsa changed the title add test to check default middlewares have not changed Remove middlewares marked for deletion Jun 8, 2023
@reedsa reedsa force-pushed the test-for-default-middlewares branch from 72fe09b to 47a6cff Compare June 8, 2023 19:45
@reedsa reedsa requested review from kclowes and wolovim June 8, 2023 20:06
@reedsa reedsa force-pushed the test-for-default-middlewares branch from 8d109b7 to e88daaa Compare June 8, 2023 20:09
docs/middleware.rst Outdated Show resolved Hide resolved
docs/middleware.rst Outdated Show resolved Hide resolved
@reedsa reedsa force-pushed the test-for-default-middlewares branch from 6460675 to 46494eb Compare June 14, 2023 21:34
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thanks for taking it on! I just left a couple small comments.

middleware performs the following translations for requests and responses.

* Numeric request parameters will be converted to their hexadecimal representation
* Numeric responses will be converted from their hexadecimal representations to
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have this info somewhere else? Even though we're not using the middleware any more, I think this info is still relevant if we can find a good place for it.

Copy link
Collaborator

@fselmo fselmo Jun 15, 2023

Choose a reason for hiding this comment

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

I could be mistaken but I don't actually see any good detail on formatters in the docs. Since this moved to the formatters we should definitely add a section explaining what they do and how they work, etc. I would say that's beyond the scope of this PR but I can create an issue to track it.


edit: created #2994 to track this

docs/middleware.rst Show resolved Hide resolved
(validation_middleware, "validation"),
(abi_middleware, "abi"), # Delete
(abi_middleware, "abi"),
Copy link
Collaborator

@kclowes kclowes Jun 14, 2023

Choose a reason for hiding this comment

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

This can be a separate PR, but since all of the tests are failing on the eth-tester inbound validation, I suspect there is a bug with either the inbound validation in eth-tester, or with our eth-tester logic that does some type conversions before we send to eth-tester. We should make an issue though to track this removal.

Never mind, just saw that the integration tests are failing too.

@reedsa reedsa mentioned this pull request Jun 15, 2023
@reedsa reedsa merged commit f3834ef into ethereum:main Jun 15, 2023
@pacrob pacrob deleted the test-for-default-middlewares branch January 10, 2024 17:22
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.

4 participants