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

Bump [email protected] #2065

Merged
merged 27 commits into from
Sep 28, 2023
Merged

Bump [email protected] #2065

merged 27 commits into from
Sep 28, 2023

Conversation

angrybayblade
Copy link
Contributor

@angrybayblade angrybayblade commented Sep 26, 2023

Proposed changes

  • bumps [email protected]
  • bumps protobuf<5.0.0,>=4.21.6 and web3<7,>=6.0.0
  • bumps protobuf compiler to v24.3
  • generates the latest protocol packages

Fixes

If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an x in the box that applies

  • Non-breaking fix (non-breaking change which fixes an issue)
  • Breaking fix (breaking change which fixes an issue)
  • Non-breaking feature (non-breaking change which adds functionality)
  • Breaking feature (breaking change which adds functionality)
  • Refactor (non-breaking change which changes implementation)
  • Messy (mixture of the above - requires explanation!)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have locally run services that could be impacted and they do not present failures derived from my changes
  • Public-facing documentation has been updated with the changes affected by this PR. Even if the provided contents are not in their final form, all significant information must be included.
  • Any backwards-incompatible/breaking change has been clearly documented in the upgrading document.

Comment on lines -113 to +114
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
unzip protoc-24.3-linux-x86_64.zip -d protoc
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bumped because of the protobuf bump

Comment on lines +242 to +254
.PHONY: build-proto
build-proto:
@protoc -I $$INCLUDE \
--proto_path=packages/valory/connections/abci/protos/ \
--python_out=packages/valory/connections/abci/ \
packages/valory/connections/abci/protos/gogoproto/gogo.proto \
packages/valory/connections/abci/protos/tendermint/crypto/proof.proto \
packages/valory/connections/abci/protos/tendermint/crypto/keys.proto \
packages/valory/connections/abci/protos/tendermint/abci/types.proto \
packages/valory/connections/abci/protos/tendermint/types/types.proto \
packages/valory/connections/abci/protos/tendermint/types/validator.proto \
packages/valory/connections/abci/protos/tendermint/types/params.proto \
packages/valory/connections/abci/protos/tendermint/version/types.proto
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To build the abci connection protos

Comment on lines +119 to +136
def load_hwi_plugin() -> Type[LedgerApi]: # pragma: nocover
"""Load HWI Plugin."""
try:
from aea_ledger_ethereum_hwi.hwi import ( # pylint: disable=import-outside-toplevel
EthereumHWIApi,
)

return EthereumHWIApi
except ImportError as e:
raise click.ClickException(
"Hardware wallet plugin not installed, "
"Run `pip3 install open-aea-ledger-ethereum-hwi` to install the plugin"
) from e
except TypeError as e:
raise click.ClickException(
'Protobuf compatibility error; Please export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" '
"to use the hardware wallet without any issues"
) from e
Copy link
Contributor Author

@angrybayblade angrybayblade Sep 27, 2023

Choose a reason for hiding this comment

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

Lazy loading to avoid the protobuf incompatibility issue valory-xyz/open-aea#671

Comment on lines +34 to +38
from packages.valory.connections.abci.tendermint.abci.types_pb2 import ( # type: ignore
LastCommitInfo as LastCommitInfoPb,
)
from packages.valory.connections.abci.tendermint.abci.types_pb2 import Request
from packages.valory.connections.abci.tendermint.abci.types_pb2 import (
from packages.valory.connections.abci.tendermint.abci.types_pb2 import Request # type: ignore
from packages.valory.connections.abci.tendermint.abci.types_pb2 import ( # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

What has changed that we need so many type ignores now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new version of protobufs does not define these objects explicitly, rather they are built at the compile time so the *_pb.py files don't contain any explicitly defined objects so the type checks fail there

dvilelaf
dvilelaf previously approved these changes Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (91b15ba) 94.27% compared to head (316e046) 94.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2065      +/-   ##
==========================================
- Coverage   94.27%   94.23%   -0.04%     
==========================================
  Files         263      263              
  Lines       15955    15956       +1     
==========================================
- Hits        15041    15036       -5     
- Misses        914      920       +6     
Flag Coverage Δ
unittests 94.23% <38.46%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
autonomy/__version__.py 100.00% <100.00%> (ø)
autonomy/constants.py 100.00% <100.00%> (ø)
...ages/valory/connections/abci/tendermint_decoder.py 100.00% <100.00%> (ø)
packages/valory/protocols/abci/__init__.py 0.00% <ø> (ø)
packages/valory/protocols/ipfs/__init__.py 0.00% <ø> (ø)
packages/valory/protocols/tendermint/__init__.py 0.00% <ø> (ø)
autonomy/cli/helpers/chain.py 92.13% <66.66%> (-1.18%) ⬇️
packages/valory/protocols/abci/message.py 60.20% <0.00%> (ø)
packages/valory/protocols/ipfs/message.py 60.00% <0.00%> (ø)
packages/valory/protocols/tendermint/message.py 57.14% <0.00%> (ø)
... and 3 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@angrybayblade angrybayblade merged commit be29a2a into main Sep 28, 2023
22 of 24 checks passed
@DavidMinarsch DavidMinarsch deleted the bump/oaea-1-40-0 branch November 25, 2023 23:21
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.

2 participants