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

Jenkins - fail to monitor stacked builds #49

Open
merceroz opened this issue Oct 31, 2014 · 1 comment
Open

Jenkins - fail to monitor stacked builds #49

merceroz opened this issue Oct 31, 2014 · 1 comment

Comments

@merceroz
Copy link

We have a job that builds on each commit. This can cause a build to be scheduled whilst a build is still running. This second build waits for the first build to finish and them immediately starts. Each build takes a couple of minutes.

SirenOfShame does not record the result of the first build.

The code in HudsonBuildStatus GetBuildStatus looks to generate a call to Jenkins like this ...

 https://url/ci/job/job_name/api/xml 

And from the returned XML looks at the latBuild/number element. It uses this build number to generated this

https://url/ci/job/job_name/575/api/xml 

where 575 is the last build number.

The resultant XML is passed to GetBuildStatusAndCommentsFromXDocument and presumably processed into Siren of Shame.

So this happens

  • Jenkins - Build 1 starts
  • SoS - checks last build - gets 1
  • SoS - checks build status for build 1 - still running
  • SoS - checks last build - gets 1
  • SoS - checks build status for build 1 - still running
  • Jenkins - build 1 completes and build 2 starts
  • SoS - checks last build - gets 2
  • SoS - checks build status for build 2 - still running
  • SoS - checks last build - gets 2
  • SoS - checks build status for build 2 - still running
  • Jenkins - build 2 completes - no other build starts
  • SoS - checks last build - gets 2
  • SoS - checks build status for build 2 - complete success or fail

Therefore the result of build 1 is never recorded.

Hope that makes sense!

@lprichar
Copy link
Member

That makes perfect sense. Thanks for the detailed analysis. I'll have to think about the best way to approach this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants