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

vvm rate limiting, adjust parameters and use retry_with_request #141

Open
antazoey opened this issue Jan 7, 2025 · 1 comment
Open

vvm rate limiting, adjust parameters and use retry_with_request #141

antazoey opened this issue Jan 7, 2025 · 1 comment
Assignees

Comments

@antazoey
Copy link
Member

antazoey commented Jan 7, 2025

Overview

vvm downloading vyper versions will get rate limited from github when running the ape actions across all the python versions.
we should adjust the parameters so it works and ci passed in a project using the apeworx action across all python versions.

how it looks right now:

https://github.com/ApeWorX/ape-vyper/blob/main/ape_vyper/compiler/api.py#L140-L158

        while times_tried < max_retries:
            try:
                result = vvm.get_installable_vyper_versions(headers=headers)
            except ConnectionError as err:
                if "API rate limit exceeded" in str(err):
                    if times_tried == max_retries:
                        raise VyperInstallError(str(err)) from err

                    # Retry
                    logger.warning(
                        f"GitHub throttled requests. Retrying in '{buffer}' seconds. "
                        f"Tries left={max_retries - times_tried}"
                    )
                    time.sleep(buffer)
                    buffer += 1
                    times_tried += 1
                    continue

Dependencies

Include links to any open issues that must be resolved before this feature can be implemented.

Copy link

linear bot commented Jan 7, 2025

@antazoey antazoey self-assigned this Jan 7, 2025
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

No branches or pull requests

1 participant