-
Notifications
You must be signed in to change notification settings - Fork 28
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
Running git fetch --shallow-since
to fetch commit author log causes hang on Buildkite runners
#212
Comments
Apologies for the inconvenience! Thank you for the report, and the investigation on your part. We are looking into the problem. |
@camallen When you tested your change, does the following command print anything?
|
@camallen We released a new knapsack_pro gem 5.3.3 version. It cancels the If you still could provide logs that would be helpful so that we have a better understanding of the issue. Thank you. |
We also released the fix for the |
I ran into the same thing on Buildkite with similar setup (haven't tried the latest version just yet), but here's what showed up in the logs right before the agent would hang:
|
Thanks @irphilli and apologies for the tardy reply knapsack folks. I think this issue is related to git authentication to a private repo as the git credentials from buildkite are not available by default inside the repo. I'm asking the buildkite folks in buildkite/elastic-ci-stack-s3-secrets-hooks#58 and https://forum.buildkite.community/t/use-git-credentials-in-a-docker-container/3137 I'm not sure the use of timeout in ruby is the best solution (though it does work), https://jvns.ca/blog/2015/11/27/why-rubys-timeout-is-dangerous-and-thread-dot-raise-is-terrifying/ and the linked sidekiq author article http://www.mikeperham.com/2015/05/08/timeout-rubys-most-dangerous-api/ I'll report back what i find from buildkite as fixing this via a configuration setting will negate the need to run a timeout block on this ruby code |
@irphilli Please let us know if the latest knapsack_pro gem version work for you.
@camallen Thanks for the details about the potential
Ok. Thank you. |
I haven't seen any build timeouts with the newer version. |
@irphilli Thanks for the info. |
@camallen I'm closing this issue for now. If you have more context, feel free to provide it or reopen the issue. |
Thanks @ArturT agree to close this as it's working. FWIW - this appears to be an issue with the use of docker containers and the I'll fold any solutions I discover or get from buildkite folks. |
@camallen ok. Thank you. |
Our buildkite runner agents hang forever (> 30mins till we kill them) due to the introduction of the
git_commit_authors
functionality.Our buildkite job uses docker / compose to mount the app and git repo to the container. And when we try and use knapsack via
bundle exec rake "knapsack_pro:rspec[--format progress"
we get an indefinite hang where thegit fetch
cmd never finishes and our CI system breaks :(I've tried to work around the issue using the following but the only way i could get it working was to not run the
git fetch
via the disabling ENV var in my fork of your repo that I used in CI system to debug / test solutions, https://github.com/camallen/knapsack_pro-ruby/commits/avoid-git-log-pagingTo fix
git fetch
inknapsack_pro-ruby/lib/knapsack_pro/repository_adapters/git_adapter.rb
Line 45 in 313d557
Noting that when I don't run the
git fetch
the code still works so perhaps the buildkite CI system doesn't need this shallow fetch for the author commit log?Any help getting this fixes is appreciated, in the meantime I'm pursuing option 1 and downgrading the gem.
The text was updated successfully, but these errors were encountered: