Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6779

Successful build appears as failed (red) after deleting next "gray" build

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Windows 2008 server

      Scenario to reproduce:
      1. While you have successful builds in the list, stop the running build in the early stages, so it will appear as gray.
      2. Delete the last "gray" build

      The previous Successful build will appear as Failed (red), although in the build.xml appears
      <result>SUCCESS</result>
      Reloading configuration from the disk or restarting Hudson doesn't help.

        1. build.xml
          14 kB
        2. config.xml
          3 kB

          [JENKINS-6779] Successful build appears as failed (red) after deleting next "gray" build

          liyatikal created issue -

          Alan Harder added a comment -

          I wasn't able to reproduce this using a simple job with no SCM, just a shell script build step doing "sleep 20".
          Can you find more specific steps to see the problem?

          Alan Harder added a comment - I wasn't able to reproduce this using a simple job with no SCM, just a shell script build step doing "sleep 20". Can you find more specific steps to see the problem?

          liyatikal added a comment -

          Actually it happens sometimes when deleting a failed build as well (not just a gray one).
          The most annoying thing is that I can't define when exactly it happened and when it doesn't.

          Please see the attached movie - I recorded the following flow:

          • I delete the failed build #3938
          • After #3938 is deleted, you can see that the previous one #3937 became red, although it appeared successful before. No need to say that its build.xml hasn't changed.

          liyatikal added a comment - Actually it happens sometimes when deleting a failed build as well (not just a gray one). The most annoying thing is that I can't define when exactly it happened and when it doesn't. Please see the attached movie - I recorded the following flow: I delete the failed build #3938 After #3938 is deleted, you can see that the previous one #3937 became red, although it appeared successful before. No need to say that its build.xml hasn't changed.

          Alan Harder added a comment -

          does it appear red in both the build history widget and on its build page?
          please confirm that YOURHUDSON/job/JOBNAME/3937/buildStatus also redirects you to red.gif instead of blue.gif

          can you go to Manage Hudson / Script console and try this:

          hudson.model.Hudson.instance.getJob('JOBNAME').getBuildByNumber(3937).buildStatusUrl

          does this show "red" ?

          what do you get for:

          hudson.model.Hudson.instance.getJob('JOBNAME').getBuildByNumber(3937).result

          Alan Harder added a comment - does it appear red in both the build history widget and on its build page? please confirm that YOURHUDSON/job/JOBNAME/3937/buildStatus also redirects you to red.gif instead of blue.gif can you go to Manage Hudson / Script console and try this: hudson.model.Hudson.instance.getJob('JOBNAME').getBuildByNumber(3937).buildStatusUrl does this show "red" ? what do you get for: hudson.model.Hudson.instance.getJob('JOBNAME').getBuildByNumber(3937).result

          Alan Harder added a comment -

          can you post config.xml for the job and build.xml for 3937?

          Alan Harder added a comment - can you post config.xml for the job and build.xml for 3937?

          liyatikal added a comment -

          It seems like my attachment movie wasn't attached..
          To your questions:

          • it doesn't appear on the Builds History page - we have a lot of jobs and most of them maven jobs, so on this page i can see the "modules" builds. The build #3937 for this job is too old
          • http://myserver/hudson/job/ALL-CI/3937/BuildStatus point to the red.gif
          • running the command in the Console, I get the same result:
            Result: red.gif
          • running the second command, I get:
            Result: FAILURE
          • i am attaching config.xml for the job and build.xml for build #3937

          liyatikal added a comment - It seems like my attachment movie wasn't attached.. To your questions: it doesn't appear on the Builds History page - we have a lot of jobs and most of them maven jobs, so on this page i can see the "modules" builds. The build #3937 for this job is too old http://myserver/hudson/job/ALL-CI/3937/BuildStatus point to the red.gif running the command in the Console, I get the same result: Result: red.gif running the second command, I get: Result: FAILURE i am attaching config.xml for the job and build.xml for build #3937
          liyatikal made changes -
          Attachment New: build.xml [ 19544 ]
          Attachment New: config.xml [ 19545 ]

          Alan Harder added a comment -

          hm.. as you said, build.xml is unchanged (showing SUCCESS), so presumably a Hudson restart would put things right again. so something must happen in the delete action to change the in-memory result of that build.

          Alan Harder added a comment - hm.. as you said, build.xml is unchanged (showing SUCCESS), so presumably a Hudson restart would put things right again. so something must happen in the delete action to change the in-memory result of that build.

          Alan Harder added a comment -

          ok, I played with a maven type job and was able to see this occur. On my 3rd delete, the status of the previous successful build changed to failure.

          Alan Harder added a comment - ok, I played with a maven type job and was able to see this occur. On my 3rd delete, the status of the previous successful build changed to failure.
          Alan Harder made changes -
          Component/s New: maven2 [ 15487 ]
          Component/s Original: gui [ 15492 ]

            mindless Alan Harder
            liyatikal liyatikal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: