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

Merged
merged 1 commit into from Feb 12, 2015

Conversation

Projects
None yet
5 participants
@raphaelquati

No description provided.

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 9, 2015

Member

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.

Member

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.

@raphaelquati

This comment has been minimized.

Show comment Hide comment
@raphaelquati

raphaelquati Feb 9, 2015

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

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

@jenkinsadmin

This comment has been minimized.

Show comment Hide comment
@jenkinsadmin

jenkinsadmin Feb 9, 2015

Owner

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

Owner

jenkinsadmin commented Feb 9, 2015

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

@raphaelquati

This comment has been minimized.

Show comment Hide comment
@raphaelquati

raphaelquati Feb 9, 2015

Fixed line endings.

Fixed line endings.

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 9, 2015

Member

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

Thanks :)

Member

lacostej commented Feb 9, 2015

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

Thanks :)

@raphaelquati

This comment has been minimized.

Show comment Hide comment
@raphaelquati

raphaelquati Feb 10, 2015

No problem. :)

Squash done.

No problem. :)

Squash done.

@raphaelquati

This comment has been minimized.

Show comment Hide comment
@raphaelquati

raphaelquati Feb 10, 2015

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) (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dtruss.1m.html). 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 ".

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) (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dtruss.1m.html). 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

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 10, 2015

Member

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.

Member

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.

@raphaelquati

This comment has been minimized.

Show comment Hide comment
@raphaelquati

raphaelquati Feb 11, 2015

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;

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;

@raphaelquati

This comment has been minimized.

Show comment Hide comment
@raphaelquati

raphaelquati Feb 11, 2015

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

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

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 12, 2015

remove the tab :)

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 12, 2015

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

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

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

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
Details
@greenkohl23

This comment has been minimized.

Show comment Hide comment
@greenkohl23

greenkohl23 Feb 27, 2015

Hi,
I ran into the same issue with Cordova like Raphael Couto. Who mention his issue here: https://issues.jenkins-ci.org/browse/JENKINS-24874

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

Hi,
I ran into the same issue with Cordova like Raphael Couto. Who mention his issue here: https://issues.jenkins-ci.org/browse/JENKINS-24874

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

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 28, 2015

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.

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.

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Feb 28, 2015

I re-released it

It should be here: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/xcode-plugin/1.4.8/xcode-plugin-1.4.8.hpi

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

Thanks for the tip.

I re-released it

It should be here: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/xcode-plugin/1.4.8/xcode-plugin-1.4.8.hpi

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