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

Error: Commit failed to return status #261

Closed
reststop opened this issue May 9, 2016 · 7 comments
Closed

Error: Commit failed to return status #261

reststop opened this issue May 9, 2016 · 7 comments
Labels

Comments

@reststop
Copy link

reststop commented May 9, 2016

Not sure if things are working correctly.

I've created a Syncer successfully.

On my live project (don't have another project setup with multiple users and approvers on several branches) we currently have 8 open PRs.

I started the Syncer and it went through and created 8 bots. Started the first one, and it was building.
The Syncer showed an Error!

Last successful sync at 2016-05-09 22:11:59 +0000 Last sync failed with error Commit failed to return status Syncer is Idle... Waiting for the next sync...

From the log::
[ERROR]: Syncing encountered a problem. Error: Commit failed to return status. Context: SyncPair: PR (303:a/F-11-assets-) + Bot (β a/F-11)

So I stopped the Syncer. And looked over the bots.
The bot that was building, showed an (x) and I noticed the integration had been cancelled.
The next bot started

I restarted the Syncer, to see if it would continue to get errors on the Status issue

I then noticed: soon after I saw another pending integration for the first bot.
I waited until the 2nd bot finished. It finished successfully.

I checked the PRs in Stash and they all show a button for "Merge Build" but it is greyed out.
I checked the PR for the bot that completed and the button was still greyed out, and I noticed that the bot had another integration in the Pending state.

I cancelled that integration as there are 6 others pending in front of it.

I am currently letting the Syncer run, hoping that it may stabilize and that there was some interaction between creating bots and starting and stopping the Syncer. (I hope not, since sometimes the PR branches sit around for a day or three, especially over the weekend).

Is something not working correctly? This does not seem like expected behavior.

@reststop
Copy link
Author

reststop commented May 9, 2016

Apparently something is cancelling the bots...
Bot Issue for β bugfix/ui-lock (build service error)
Integration #1 of β bugfix/ui-lock
Open in Xcode: xcbot://ndgiosci2/botID/fb69145e64f3806cec314c66b5c4c09b/integrationID/fb69145e64f3806cec314c66b5c4e4e9

Assertion: This integration was canceled.
File: (null):(null)

Full logs for this integration are attached.

: Error checking out working copies: Error Domain=com.apple.dt.SourceControlErrorDomain Code=-5 "The source control operation was canceled." UserInfo={NSLocalizedDescription=The source control operation was canceled.}
May 9 16:43:46 xcsbuildd[67172] : Error checkout/clone: Error Domain=com.apple.dt.SourceControlErrorDomain Code=-5 "The source control operation was canceled." UserInfo={NSLocalizedDescription=The source control operation was canceled.}

Any ideas?

@reststop
Copy link
Author

More info... I see if I edit one of these bots that under Repositories it shows

The server SSH fingerprint failed to verify.

Any suggestions on why this might happen... something more needed in the bot template?

@czechboy0
Copy link
Member

Hi @reststop, this looks like Xcode Server canceling it.

Are you using this Buildasaur or a forked version?
Are you using GitHub.com-hosted repo or a GitHub Enterprise one? Because I've never seen the Commit failed to return status error, that seems like the wrong API is being called.

@czechboy0 czechboy0 changed the title Syncer Flow Error: Commit failed to return status May 10, 2016
@reststop
Copy link
Author

I'm using gchiong's forked version. Will be examining the API to see if it is different for some reason.

Was not sure of the flow, so wasn't sure if the issue was in his code or the base. Based on your response, I think it is something in the API portion of the code, and the API may be different on out Stash than it is in Bitbucket Server. There are actually 2 spaces after "Commit" where the commit info is supposed to be, so somehow we think the API is returning a null string.

Yes, it's a Stash repo, not on guthub or bitbucket.

I'll let you know the results of my investigation now that I have a direction to search.

@reststop
Copy link
Author

Ok, just adding an answer to "this looks like Xcode Server canceling it."

It was Buildasaur that was cancelling the integrations (See Issue #266).
The reason was that the API was slightly newer and the key used to get the latest commit was "latestCommit" when our version of Stash uses the key "latestChangeset". So the headCommit was always "" and thus, the syncer always cancelled any running integrations and then enqueued a new integration.

Now that I've resolved that issue, the problem now shows:

[ERROR]: Syncing encountered a problem. Error: Failed to post a status on commit 0e3f0b953c1bdc13a52b70561ff1d9eafd87e7f3 of repo fightclub/buildasaur. Context: SyncPair: PR (1:carl/stash3-ssh-fix) + Bot (β [buildasaur] carl/stash3-ssh-fix)

And this has the SHA which was previously missing. I'm sure this is probably an API issue and I just need to locate what needs to be changed.

I will provide an update here when I find out more.

@reststop
Copy link
Author

Interesting question:

The section of code doing the status update (which seems to be failing) uses the targetUrl String? "https://stlt.herokuapp.com/v1/xcs_deeplink/myOSXserver.com/fb69145e64f3806cec314c66b5dbaf3c/fb69145e64f3806cec314c66b5dbb57f" Some
With the comment String? "Result of Integration 1\n---\n_Duration_: 1 minute and 21 seconds\n_Result_: All 0 tests passed, but please fix 1 warning." Some

I'm not familiar with herokuapp.com and such, but would running this behind a firewall cause problems? If that just passes the URL to a 'local' app that's probably OK, but more than likely myOSXserver.com cannot be reached from the outside world.

@czechboy0
Copy link
Member

Regarding the cancelling issue, I believe you understand the issue, but since you're using a fork of Buildasaur you'll have to look into it yourself, I'm not sure how to pull the latest SHA from the Stash API.

The link for stlt. is a trampoline server so that when you click on the link, it opens Xcode on the integration that Buildasaur reported. It's a nice feature for easy redirection to Xcode through a deep link. See the project here: https://github.com/czechboy0/satellite

Closing this since there's nothing outstanding. If you have any specific questions, bug reports, please open a new ticket.

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