Skip to content

perf: wait for gitlab to reconfigure instead of using hardcoded sleep #1023

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

Merged
merged 1 commit into from
Feb 24, 2020
Merged

perf: wait for gitlab to reconfigure instead of using hardcoded sleep #1023

merged 1 commit into from
Feb 24, 2020

Conversation

nejch
Copy link
Member

@nejch nejch commented Feb 20, 2020

I saw this was already tried and discussed in an older PR. I tried to use the readiness endpoint for this, but it turns out gitlab starts reporting OK on all healthchecks before it's fully reconfigured on startup (if you try docker container logs --follow gitlab-test in another shell it'll still be restarting services when the script is already at "Pausing to give GitLab some time to finish starting up...".

So it seems waiting for gitlab to report that it's reconfigured might be better. If this isn't enough for CI, then it's when gitlab logs start popping up in the container that it's 100% reliably up and running, so those could be grepped as well.

I can remove the additional log if it's too verbose, I just remember wondering if the script was hanging the first time I ran it so this gives some progress.

@nejch nejch marked this pull request as ready for review February 20, 2020 07:34
@nejch
Copy link
Member Author

nejch commented Feb 22, 2020

I opened an issue on GitLab (https://gitlab.com/gitlab-org/gitlab/issues/207599) to see if there's a better way than grepping docker logs to see when a gitlab instance is fully available. :P Let's see.

@max-wittig
Copy link
Member

@nejch I really like this! Functional tests were not that reliable before. Hopefully this will be better in the long run!

@max-wittig max-wittig merged commit 2b3871d into python-gitlab:master Feb 24, 2020
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