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

build(ci): Retry failed pulls from devservices #29691

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Nov 1, 2021

This will retry failed pulls from devservices. This happens intermittently in CI (GHA), see https://github.com/getsentry/getsentry/runs/4069112530\?check_suite_focus\=true\#step:4:563

I am not sure of the root cause as docker-py obscures the actual error (docker/docker-py#2101), as a workaround, let us retry the pull a few times and see if this helps.

This will retry failed pulls from devservices. This happens intermittently in CI (GHA), see https://github.com/getsentry/getsentry/runs/4069112530\?check_suite_focus\=true\#step:4:563

I am not sure of the root cause as docker-py obscures the actual error (docker/docker-py#2101), as a workaround, let us retry the pull a few times and see if this helps.
raise e
current_attempt = current_attempt + 1
continue
break
Copy link
Member

Choose a reason for hiding this comment

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

Would it be good if we raise something if we run out of attempts? Or log an error?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Than you, sir! I just had a moment :)

@armenzg
Copy link
Member

armenzg commented Nov 1, 2021

As a side note, should we switch to using docker pull on CI? We could have some script that extracts the versions from SENTRY_DEV_SERVICES in server.py

@billyvg
Copy link
Member Author

billyvg commented Nov 1, 2021

I think we should stick to using sentry devservices and maybe in the future evaluate if we want to keep using docker-py over something like docker-compose?

@billyvg billyvg requested a review from armenzg November 1, 2021 20:26
@billyvg billyvg merged commit e7f1d9f into master Nov 2, 2021
@billyvg billyvg deleted the build/ci/retry-failed-docker-pull-from-devservices branch November 2, 2021 17:52
@joshuarli
Copy link
Member

I think we should stick to using sentry devservices and maybe in the future evaluate if we want to keep using docker-py over something like docker-compose?

As a side note, should we switch to using docker pull on CI? We could have some script that extracts the versions from SENTRY_DEV_SERVICES in server.py

I still think docker-py in devservices is the better choice right now. One thing that could be worth exploring is putting these pulls on multiple threads. That could help saturate network read and it would be especially a good speedup in case failed pulls happen. Maybe docker pull does some smarter things and is faster than docker-py though. In either case we don't need a script like that, just subprocess out to docker pull in each thread.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants