-
-
Notifications
You must be signed in to change notification settings - Fork 124
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: fix for docker issue AttributeError: module 'rlp' has no attribute 'Serializable'
#891
Conversation
…' has no attribute 'Serializable'`
3a295fa
to
5d1daf9
Compare
RUN pip install .[recommended-plugins] | ||
RUN pip install . | ||
RUN ape plugins install alchemy ens etherscan foundry hardhat infura ledger solidity template tokens trezor vyper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change? Does it function without this update? This is helpful because we can add/remove packages to the "Recommended" list without having to edit this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no it doesn't. If I revert there is an error when building that it can't install the plugins properly. I will update this comment shortly with the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fubuloubu Things tend to work better across the board when installing separately versus using setup.py
keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> => # INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce => => # runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
and
#11 124.5 ERROR: Cannot install eth-ape and eth-ape[recommended-plugins]==0.3.6.dev13+g5d1daf9f.d20220719 because these package versions have conflicting dependencies.
#11 124.5 The conflict is caused by:
#11 124.5 eth-ape[recommended-plugins] 0.3.6.dev13+g5d1daf9f.d20220719 depends on eth-ape 0.3.6.dev13+g5d1daf9f.d20220719 (from /code)
#11 124.5 ape-alchemy 0.2.0 depends on eth-ape<0.3.0 and >=0.2.1
#11 124.5 eth-ape[recommended-plugins] 0.3.6.dev13+g5d1daf9f.d20220719 depends on eth-ape 0.3.6.dev13+g5d1daf9f.d20220719 (from /code)
#11 124.5 ape-alchemy 0.1.1 depends on eth-ape<0.3.0 and >=0.2.1
#11 124.5 eth-ape[recommended-plugins] 0.3.6.dev13+g5d1daf9f.d20220719 depends on eth-ape 0.3.6.dev13+g5d1daf9f.d20220719 (from /code)
#11 124.5 ape-alchemy 0.1.0 depends on eth-ape<0.2.0 and >=0.1.0
#11 124.5
#11 124.5 To fix this you could try to:
#11 124.5 1. loosen the range of package versions you've specified
#11 124.5 2. remove package versions to allow pip attempt to solve the dependency conflict
#11 124.5
#11 124.5 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
------
executor failed running [/bin/sh -c pip install .[recommended-plugins]]: exit code: 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugins needs eth-ape and eth-ape needs the plugins, the cyclic dependency causes pip to have to work really hard (in the best case scenario that it succeeds)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this seems like a nasty bug!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this seems like a nasty bug!
I think it might actually be two bugs because the INFO
one with the cyclic dependencies happens when I do that command in regular ape (non-docker) and although it doesn't seem to fail it takes forever to install.
RUN pip install .[recommended-plugins] | ||
RUN pip install . | ||
RUN ape plugins install alchemy ens etherscan foundry hardhat infura ledger solidity template tokens trezor vyper | ||
RUN pip install eth-rlp==0.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this package seems like a stub. Do you know where this dependency is required from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is required by eth-account
but not listed correctly in the pins for the version we are using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could try adding this to our setup.py
as a dependency instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could try adding this to our
setup.py
as a dependency instead
it conflicts with a number of other dependencies of our current pinned version dependencies however so we would need to update the versions for those pins to be compatible as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
honestly, I am not sure I trust [recommended-plugins]
key in setup.py
. Have we properly tested this in a fresh env? I think it works ok when you already have ape installed but I am concerned about the cyclic dependency and causing pip to work really hard.
also at some point it would be good to have automated testing for docker but it would increase our check build times in github check CI |
On some level even if we do future work on this, this PR can be merged to resolve the issue and we can figure the rest out in a spike? @fubuloubu @unparalleled-js |
Exactly, the error we were seeing didn't show up until you attempted to run any ape command, including |
What I did
update dockerfile with the following:
RUN pip install eth-rlp==0.3.0
fixes: #857
How I did it
I tested each of the changes and all were required to successfully build and run the docker image with ape.
How to verify it
fetch & checkout this repo/branch and
docker build .
then run the resulting hash withdocker run <hash>
and it will no longer fail with the errorAttributeError: module 'rlp' has no attribute 'Serializable'
Checklist