eth-brownie / brownie

A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
https://eth-brownie.readthedocs.io
MIT License
2.64k stars 550 forks source link

chainlink release 1.4.0 is not retrievable anymore through brownie package manager #1679

Open gosuto-inzasheru opened 1 year ago

gosuto-inzasheru commented 1 year ago

Environment information

What was wrong?

when including the following in brownie-config.yaml:

dependencies:
    - smartcontractkit/chainlink@1.4.0

it currently fails with:

ValueError: Invalid version for this package. Available versions are:
test-2020-03-03, 2.0.0-beta0, 1.13.1-beta0, 1.13.0, 1.13.0-rc2, 1.13.0-rc1, 1.13.0-rc0, 1.13.0-healthchecks-20230320, 1.13.0-healthchecks1, 1.13.0-beta4, 1.13.0-beta3, 1.13.0-beta2, 1.13.0-beta1, 1.13.0-beta0, 1.12.1-rc0, 1.12.1-beta4, 1.12.1-beta3, 1.12.1-beta2, 1.12.1-beta1, 1.12.1-beta0, 1.12.0, 1.12.0-rc2, 1.12.0-rc1, 1.12.0-rc0, 1.12.0-clf-20230224, 1.12.0-clf-20230217, 1.12.0-clf-20230214, 1.12.0-beta2, 1.12.0-beta1, 1.12.0-beta0, 1.12.0-base-rc1, 1.12.0-base-rc0, 1.11.1-rc1, 1.11.1-rc0, 1.11.1-beta2, 1.11.1-beta1, 1.11.1-beta0, 1.11.0, 1.11.0-rc6, 1.11.0-rc5, 1.11.0-rc4, 1.11.0-rc3, 1.11.0-rc2, 1.11.0-rc1, 1.11.0-rc0, 1.11.0-clf-20230127, 1.11.0-beta4, 1.11.0-beta3, 1.11.0-beta2, 1.11.0-beta1, 1.11.0-beta0, 1.10.0, 1.10.0-rc0, 1.10.0-beta5, 1.10.0-beta4, 1.10.0-beta3, 1.10.0-beta2, 1.10.0-beta1, 1.10.0-beta0, 1.9.0, 1.9.0-rc1, 1.9.0-beta1, 1.9.0-beta0, 1.8.1, 1.8.1-rc1, 1.8.1-rc0, 1.8.1-debug-keepers-opt-arb, 1.8.1-beta2, 1.8.1-beta1, 1.8.1-beta0, 1.8.0, 1.8.0-rc1, 1.8.0-rc0, 1.8.0-debug-keepers-opt-arb, 1.8.0-beta3, 1.8.0-beta2, 1.8.0-beta1, 1.8.0-beta0, 1.7.2-beta2, 1.7.2-beta1, 1.7.2-beta0, 1.7.1, 1.7.1-rc1, 1.7.1-rc0, 1.7.0, 1.7.0-rc3, 1.7.0-rc2, 1.7.0-rc1, 1.7.0-rc0, 1.7.0-beta0, 1.6.0, 1.6.0-rc1, 1.6.0-rc0, 1.6.0-debug-vrfv1-rinkeby-broadcast-log, 1.6.0-debug-vrfv1-listener-logs, 1.6.0-debug-multikeys-timeout, 1.6.0-debug-multikeys-pprof, 1.6.0-debug-multikeys, 1.6.0-beta3, 1.6.0-beta2

How can it be fixed?

it looks like the retrieval of available tags/versions is paginated, i count exactly 100. this makes it so that older versions of packages eventually become unavailable, even though their tag is available on the repo.

gosuto-inzasheru commented 1 year ago

issue is in https://github.com/eth-brownie/brownie/blob/4e71252540d9a021f1853f4fb3a03596aa07b86d/brownie/project/main.py#L935

drLis commented 1 year ago

@gosuto-inzasheru hay! It's not a good practice and there is no info about that in brownie docs, but you can also get version from specific commit. Also I agree that problem exists and is not fixed yet.

gosuto-inzasheru commented 1 year ago

needs pagination; eg f"https://api.github.com/repos/{org}/{repo}/tags?per_page=100&page=2", headers=headers