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

Duplicate builds leading to wrong commit status

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical

      We noticed that the wrong pipeline status is often reported in GitHub PRs.

      Further investigation showed very odd behavior. We have not yet found the cause of this problem (random?).

       

      The 'Detail' link leads to the build which is successful. There is one previous build that was unsuccessful, but it links to the newer one.

       

      Now comes the odd thing: The Jenkins log shows that the same build id was build twice!

      First, it runs successful (trigger: PR Update):

      { [-]
         build_number: 2
         build_url: job/(...)/PR-2906/2/
         event_tag: job_event
         job_duration: 1108.635
         job_name: (...)/PR-2906
         job_result: SUCCESS
         job_started_at: 2023-01-19T14:41:14Z
         job_type: Pipeline
         label: master
         metadata: { [+]
         }
         node: (built-in)
         queue_id: 1781283
         queue_time: 5.063
         scm: git
         test_summary: { [+]
         }
         trigger_by: Pull request #2906 updated
         type: completed
         upstream:
         user: anonymous
      } 

      Then, another run, under the exact same build id / url :

      {
         build_number: 2
         build_url: job/(...)/PR-2906/2/
         event_tag: job_event
         job_duration: 1.959
         job_name: (...)/PR-2906
         job_result: FAILURE
         job_started_at: 2023-01-20T07:14:50Z
         job_type: Pipeline
         label: master
         node: (built-in)
         queue_id: 2261495
         queue_time: 7.613
         test_summary: { [+]
         }
         trigger_by: Branch indexing
         type: completed
         upstream:
         user: anonymous
      } 

      Notice that the trigger is now "Branch indexing".

       

      The failed build is not displayed in the UI and the script console also returns #2 as the last successful build. We assume that this "corrupt" build is reported to GitHub. Does anyone have any ideas how this may happen? Any ideas are very welcome!

       

      Best,

      Jan

       

            lanwen Kirill Merkushev
            meiswjn Jan
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: