Add timeout on "xcodebuild -list", if XCode version 6 #58

merged 1 commit into from Feb 12, 2015


None yet
5 participants

No description provided.


lacostej commented Feb 9, 2015

Hei Raphael, I can't review the commit as the formatting was modified heavily. Could you please try again and check spacing / line endings configurations ? Feel free to push force on that branch to check it again.

If you have problem, I'll try to deal with it when merging manually.

Sorry about that. Windows + Eclipse issues..... :)


jenkinsadmin commented Feb 9, 2015

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

Fixed line endings.


lacostej commented Feb 9, 2015

Sorry to be an ass... Can you squash those so that I can review from the github interface ?

Thanks :)

No problem. :)

Squash done.

I think it's better to put a default timeout , instead of parse xcode version.

I don't know the reason of hang in xcode 6, but I think Apple will keep this behaviour.

I've tried to discover the problem, using dtruss (like strace) ( it expects (i guess) the Xcode is running. If you ran xcodebuild -list with xcode opened, it shows more activity (in dtruss).

Another options, is to put an option at plugin to not run " xcodebuild -list ".


lacostej commented Feb 10, 2015

Raphael, what about the try/catch/finally ? is it really needed ? Was it to ensure that returnCode would be 0 ? Have you checked the joinWithTimeout was returning when invoking the hanging xocdebuild -list command ?

I am trying to get the code as simple as possible.

My first test, after calls to "joinWithTimeout", the build is marked as failure. Always (maybe the TaskListener?)

joinWithTimeout always returns (timeout), build always marked as fail, with no Exception.

I've use try/catch block, to try to avoid this behavior. No results. So. I changed from try/catch to try/finally, to mark returnCode = 0. But the try/finally block cannot know between an real error and a timeout. This is not good.

To keep the code to simple.
I can make a "fix if" with value of 143 (timeout)? LIke this:

if (resultCode > 0 && resultCode != 143) return false;

I'd reviewed my code. It was wrong.
I think the code is simple now. Using a default timeout to any version of xcode.

That's much better! I will merge and clean up a bit for documentation purposes.

@lacostej lacostej added a commit that referenced this pull request Feb 12, 2015

@lacostej lacostej Merge pull request #58 from raphaelquati/master
Add timeout on "xcodebuild -list", if XCode version 6

@lacostej lacostej merged commit 73d40c2 into jenkinsci:master Feb 12, 2015

1 check passed

Jenkins This pull request looks good

I ran into the same issue with Cordova like Raphael Couto. Who mention his issue here:

You answered him to deliver it in version 1.4.8. Is there any plan, when you will release it?

It was meant to be released, but it looks like something went wrong. There were some issues with the jenkins infra. I'll double check what happened.

I re-released it

It should be here:

I expect the jenkins infra to pick it up during the next 24hours.

Thanks for the tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment