Skip to content

[JENKINS-76063] Github Repo already built but changes detected on webhook #773

@jenkins-infra-bot

Description

@jenkins-infra-bot

This is happening semi-frequently, but not all of the time. A user made a commit to a branch that does not trigger jenkins, but the pipeline was executed anyway. Here's the webhook log showing the revisions already built but changes being found anyway.

 

Started on Aug 28, 2025, 5:21:23 PM
Started by event from 140.82.115.65 ⇒ https://public-jenkins.insureondev.com/github-webhook/ on Thu Aug 28 17:21:23 CDT 2025
Using strategy: Default
[poll] Last Built Revision: Revision 2287d64917a8b9cce5729ea16b1727d017b08bcb (refs/remotes/origin/main)
The recommended git tool is: NONE
using credential [redacted]
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
using GIT_SSH to set credentials [redacted]
Verifying host key using manually-configured host key entries
 > git ls-remote -h -- git@​github.com:Terminal-Suite/Foundation.git # timeout=10
Found 466 remote heads on git@​github.com:Terminal-Suite/Foundation.git
[poll] Latest remote head revision on refs/heads/main is: 2287d64917a8b9cce5729ea16b1727d017b08bcb - already built by 76
Using strategy: SpecificRevisionBuildChooser
[poll] Last Built Revision: Revision a0e6f7e94b9455e047721042dd0997960bfd9be9 (main)
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential [redacted]
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
using GIT_SSH to set credentials [redacted]
Verifying host key using manually-configured host key entries
 > git ls-remote -h -- git@​github.com:Terminal-Suite/services_builds.git # timeout=10
Found 12 remote heads on git@​github.com:Terminal-Suite/services_builds.git
[poll] Latest remote head revision on refs/heads/main is: a0e6f7e94b9455e047721042dd0997960bfd9be9 - already built by 76
Using strategy: SpecificRevisionBuildChooser
[poll] Last Built Revision: Revision 4f27a219763f46d1cd41cc1ffd3956cd4a650a32 (main)
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential [redacted]
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
using GIT_SSH to set credentials [redacted]
Verifying host key using manually-configured host key entries
 > git ls-remote -h -- git@​github.com:Terminal-Suite/jenkins-shared-libs.git # timeout=10
Found 4 remote heads on git@​github.com:Terminal-Suite/jenkins-shared-libs.git
[poll] Latest remote head revision on refs/heads/main is: 4f27a219763f46d1cd41cc1ffd3956cd4a650a32 - already built by 76
Using strategy: Default
[poll] Last Built Revision: Revision 2287d64917a8b9cce5729ea16b1727d017b08bcb (refs/remotes/origin/main)
[poll] Working Directory does not exist
Done. Took 0.82 sec
Changes found 

Jenkins is configured to only build refs/heads/main. The build is done via a temporary docker container spun up through Kubernetes that terminates upon pipeline completion. It only seems to be happening on this pipeline. Unfortunately, this is the most important pipeline in our environment.

The config.xml of the pipeline in question.

 

'1.1' encoding='UTF-8'?>
"workflow-job@​1540.v295eccc9778f">
  
    "workflow-multibranch@​811.vcd33d074c2a_0">
      
        hudson.model.ParametersDefinitionProperty
      
    
  
  
  false
  
    
      "hudson.tasks.LogRotator">
        7
        7
        7
        7
        false
      
    
    
      false
    
    
      
        
          run_tests
          Run tests
          true
        
      
    
    
      
        "github@​1.44.0">
          
        
      
    
  
  "org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@​4183.v94b_6fd39da_c1">
    "hudson.plugins.git.GitSCM" plugin="git@​5.7.0">
      2
      
        
          git@​github.com:Terminal-Suite/Foundation.git
          [redacted]
        
      
      
        
          refs/heads/main
        
      
      false
      "empty-list"/>
      
    
    Jenkinsfile
    false
  
  false
 

 

 


Originally reported by bprob, imported from: Github Repo already built but changes detected on webhook
  • assignee: lanwen
  • status: Open
  • priority: Major
  • component(s): github-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-08
Raw content of original issue

This is happening semi-frequently, but not all of the time. A user made a commit to a branch that does not trigger jenkins, but the pipeline was executed anyway. Here's the webhook log showing the revisions already built but changes being found anyway.

 

Started on Aug 28, 2025, 5:21:23 PM
Started by event from 140.82.115.65 ⇒ https://public-jenkins.insureondev.com/github-webhook/ on Thu Aug 28 17:21:23 CDT 2025
Using strategy: Default
[poll] Last Built Revision: Revision 2287d64917a8b9cce5729ea16b1727d017b08bcb (refs/remotes/origin/main)
The recommended git tool is: NONE
using credential [redacted]
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
using GIT_SSH to set credentials [redacted]
Verifying host key using manually-configured host key entries
 > git ls-remote -h -- git@github.com:Terminal-Suite/Foundation.git # timeout=10
Found 466 remote heads on git@github.com:Terminal-Suite/Foundation.git
[poll] Latest remote head revision on refs/heads/main is: 2287d64917a8b9cce5729ea16b1727d017b08bcb - already built by 76
Using strategy: SpecificRevisionBuildChooser
[poll] Last Built Revision: Revision a0e6f7e94b9455e047721042dd0997960bfd9be9 (main)
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential [redacted]
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
using GIT_SSH to set credentials [redacted]
Verifying host key using manually-configured host key entries
 > git ls-remote -h -- git@github.com:Terminal-Suite/services_builds.git # timeout=10
Found 12 remote heads on git@github.com:Terminal-Suite/services_builds.git
[poll] Latest remote head revision on refs/heads/main is: a0e6f7e94b9455e047721042dd0997960bfd9be9 - already built by 76
Using strategy: SpecificRevisionBuildChooser
[poll] Last Built Revision: Revision 4f27a219763f46d1cd41cc1ffd3956cd4a650a32 (main)
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential [redacted]
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
using GIT_SSH to set credentials [redacted]
Verifying host key using manually-configured host key entries
 > git ls-remote -h -- git@github.com:Terminal-Suite/jenkins-shared-libs.git # timeout=10
Found 4 remote heads on git@github.com:Terminal-Suite/jenkins-shared-libs.git
[poll] Latest remote head revision on refs/heads/main is: 4f27a219763f46d1cd41cc1ffd3956cd4a650a32 - already built by 76
Using strategy: Default
[poll] Last Built Revision: Revision 2287d64917a8b9cce5729ea16b1727d017b08bcb (refs/remotes/origin/main)
[poll] Working Directory does not exist
Done. Took 0.82 sec
Changes found 

Jenkins is configured to only build refs/heads/main. The build is done via a temporary docker container spun up through Kubernetes that terminates upon pipeline completion. It only seems to be happening on this pipeline. Unfortunately, this is the most important pipeline in our environment.

The config.xml of the pipeline in question.

 

<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@1540.v295eccc9778f">
  <actions>
    <org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction plugin="workflow-multibranch@811.vcd33d074c2a_0">
      <jobPropertyDescriptors>
        <string>hudson.model.ParametersDefinitionProperty</string>
      </jobPropertyDescriptors>
    </org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction>
  </actions>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>7</daysToKeep>
        <numToKeep>7</numToKeep>
        <artifactDaysToKeep>7</artifactDaysToKeep>
        <artifactNumToKeep>7</artifactNumToKeep>
        <removeLastBuild>false</removeLastBuild>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
    <org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty>
      <abortPrevious>false</abortPrevious>
    </org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.model.BooleanParameterDefinition>
          <name>run_tests</name>
          <description>Run tests</description>
          <defaultValue>true</defaultValue>
        </hudson.model.BooleanParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
    <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
      <triggers>
        <com.cloudbees.jenkins.GitHubPushTrigger plugin="github@1.44.0">
          <spec></spec>
        </com.cloudbees.jenkins.GitHubPushTrigger>
      </triggers>
    </org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
  </properties>
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@4183.v94b_6fd39da_c1">
    <scm class="hudson.plugins.git.GitSCM" plugin="git@5.7.0">
      <configVersion>2</configVersion>
      <userRemoteConfigs>
        <hudson.plugins.git.UserRemoteConfig>
          <url>git@github.com:Terminal-Suite/Foundation.git</url>
          <credentialsId>[redacted]</credentialsId>
        </hudson.plugins.git.UserRemoteConfig>
      </userRemoteConfigs>
      <branches>
        <hudson.plugins.git.BranchSpec>
          <name>refs/heads/main</name>
        </hudson.plugins.git.BranchSpec>
      </branches>
      <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
      <submoduleCfg class="empty-list"/>
      <extensions/>
    </scm>
    <scriptPath>Jenkinsfile</scriptPath>
    <lightweight>false</lightweight>
  </definition>
  <disabled>false</disabled>
</flow-definition> 

 

 

  • environment: Version 2.516.1, GitHub plugin Version 1.44.0

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions