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

Checkout error message #275

Open
reststop opened this issue May 20, 2016 · 3 comments
Open

Checkout error message #275

reststop opened this issue May 20, 2016 · 3 comments
Labels

Comments

@reststop
Copy link

reststop commented May 20, 2016

Received the following error in the log, and it repeats for each successive scan:

[ERROR]: Integration #1 finished with a checkout error - please check that your SSH keys setup in Buildasaur are correct! If you need to fix them, please do so and then you need to recreate the bot - e.g. by closing the Pull Request, waiting for a sync (bot will disappear) and then reopening the Pull Request - should do the job!

Nice, but no idea which bot this is for. Found one which was cancelled because there was another commit made to the PR.

I found a bot which had only one integration and it failed, said checkout was cancelled.
I deleted the bot, and on the next scan, the error disappeared.

(Easier to delete the bot and let Buildasaur recreate the bot then it is to do what the instructions say)

@reststop
Copy link
Author

reststop commented Jun 2, 2016

Two things.

  1. I'm not sure if it is possible on Stash or Bitbucket/Bitbucket enterprise to close a PR and re-open it. However, I think that the cleanest way on XcodeServer is to simply delete the offending bot and let Buildasaur see there is no bot for the PR and it will create a new one.

If it is an SSH key problem, this. of course, will not fix the issue. However, on our server, we have had ckeckout failures due to network issues, and due to killing/cancelling a bot integration during the checkout phase (one of our projects takes 20 minutes to do a clean checkout).

This error also occurs if any integration has failed with a checkout error. We stopped Buildasaur's syncer and then cancelled several integrations which were pending for different PRs. When the syncer was restarted, it reported this error, even though I had run a successful integration after the cancelled one. In this case, since it wasn't a repository error, but merely an incomplete repository, a new checkout succeeded and the bot did NOT need to be removed (thus removing the artifacts from the failed checkout). In the cases where there was something wrong with the checkout, simply deleting the bot was the simplest way to remove the offending artifacts in the integrations cache.

  1. I've modified the error message to print out the name of the offending bot, which resolves this issue Checkout error message #275

I haven't done a pull request on projects I haven't created, so what is the desired protocol to being able to send you a branch to make a PR on for Buildasaur?

Since its a simple change, for this one... I've included the fix below:

In BuildaKit/SyncPairResolver.swift: Line 74::

                     if result == .CheckoutError {
-                        Log.error("Integration #\(integration.number) finished with a checkout error - please check that your SSH keys setup in Buildasaur are correct! If you need to fix them, please do so and then you need to recreate the bot - e.g. by closing the Pull Request, waiting for a sync (bot will disappear) and then reopening the Pull Request - should do the job!")
+                        Log.error("Integration #\(integration.number) for bot (\((integration.originalJSON?["bot"]?["name"])!.description)) finished with a checkout error - please check that your SSH keys setup in Buildasaur are correct! If you need to fix them, please do so and then you need to recreate the bot - e.g. by closing the Pull Request, waiting for a sync (bot will disappear) and then reopening the Pull Request - should do the job!")
                         return true

@reststop
Copy link
Author

reststop commented Jun 2, 2016

I suggest also changing the entire message to include deleting the offending integrations or the offending bot, instead of closing and re-opening the PR. I did not change it, since I was making the most minimal change and didn't want to start a long discussion on the many ways/reasons for a checkut failure.

-Carl

@czechboy0
Copy link
Member

The thing is that closing the PR will cause Buildasaur to delete the bot and reopening will create a new one, so it's the same solution as you're suggesting (just hopefully slightly easier).

Yeah definitely send a PR into this repo. First fork the repository with the fork button at the top right, then clone that fork locally, make the changes on a new branch and then open a new PR from you fork's feature branch into Buildasaur's master.

@czechboy0 czechboy0 changed the title Not enough information on Error message - Which PR? Checkout error message Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants