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

Modified code lines not built - even when there are changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • coverage-plugin
    • None
    • Jenkins 2.426

      For some reason, is some builds the plugins fails on building the modified code lines:

       

      
      [2024-10-27T17:34:23.388Z] [Coverage] Obtaining action of reference build 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1218][2024-10-27T17:34:23.388Z] [Coverage] Obtaining reference build from reference recorder 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1219][2024-10-27T17:34:23.388Z] [Coverage] -> Found develop #656' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1220][2024-10-27T17:34:23.388Z] [Coverage] -> Using reference build develop #656' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1221][2024-10-27T17:34:23.388Z] [Coverage] -> Found reference result in build '#656' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1222][2024-10-27T17:34:23.388Z] [Coverage] Calculating the code delta... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1223][2024-10-27T17:34:23.388Z] [Coverage] -> Git delta calculator successfully created in working tree '/var/lib/jenkins/jenkins_home/workspace/PR-997' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1224][2024-10-27T17:34:23.388Z] [Coverage] -> Using commit 'ccc0290' as latest commit for build 'PR-997 #2' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1225][2024-10-27T17:34:23.388Z] [Coverage] -> Using commit 'a9d208d' as latest commit for build 'develop #656' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1226][2024-10-27T17:34:23.388Z] [Coverage] -> Invoking Git delta calculator for determining the changes between commits 'ccc0290' and 'a9d208d' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1227][2024-10-27T17:34:23.388Z] [Coverage] Preprocessing code changes... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1228][2024-10-27T17:34:23.388Z] [Coverage] Successfully mapped SCM paths to coverage report paths 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1229][2024-10-27T17:34:23.388Z] [Coverage] Successfully verified that the coverage data matches with the code delta 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1230][2024-10-27T17:34:23.388Z] [Coverage] Obtaining code changes for files... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1231][2024-10-27T17:34:23.388Z] [Coverage] Obtaining indirect coverage changes... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1232][2024-10-27T17:34:23.388Z] [Coverage] Obtaining coverage delta for files... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1233][2024-10-27T17:34:23.388Z] [Coverage] Calculating coverage deltas... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1234][2024-10-27T17:34:23.388Z] [Coverage] Evaluating quality gates 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1235][2024-10-27T17:34:23.388Z] [Coverage] -> All quality gates have been passed 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1236][2024-10-27T17:34:23.388Z] [Coverage] -> Details for each quality gate: 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1237][2024-10-27T17:34:23.388Z] [Coverage] -> [Modified code lines - Line Coverage]: ≪Not built≫ - (Actual value: n/a, Quality gate: 75.00) 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1238][2024-10-27T17:34:23.388Z] [Coverage] Executing source code painting... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1239][2024-10-27T17:34:23.388Z] [Coverage] Painting 2487 source files on agent 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1240][2024-10-27T17:34:23.388Z] [Coverage] -> finished painting successfully 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1241][2024-10-27T17:34:23.388Z] [Coverage] -> zipping sources from folder '/var/lib/jenkins/jenkins_home/workspace/PR-997/jacoco' as '/var/lib/jenkins/jenkins_home/workspace/PR-997/coverage-sources.zip' 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1242][2024-10-27T17:34:23.388Z] [Coverage] Copying painted sources from agent to build folder 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1243][2024-10-27T17:34:23.388Z] [Coverage] -> extracting... 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1244][2024-10-27T17:34:23.388Z] [Coverage] -> done 
       
      
      
      [|https://jenkins.personetics.io/blue/organizations/jenkins/Personetics-Product%2Fperso-infra/detail/PR-997/2/pipeline/#log-1245][2024-10-27T17:34:23.388Z] [Coverage] Finished coverage processing - adding the action to the build...
       
      

       

      This is how the plugin is configured:

       

      stage('Check Coverage'){
      	steps{
      		        discoverGitReferenceBuild(targetBranch: 'develop')
      		        script {
      		            if (env.CHANGE_TARGET != null && env.CHANGE_TARGET == 'develop'){
                              recordCoverage(tools: [[parser: 'JACOCO']],
                                             id: 'jacoco', name: 'JaCoCo Coverage',
                                             sourceCodeRetention: 'LAST_BUILD',
                                             sourceDirectories: [[path: 'glob:**/src/main/java']],
                                             qualityGates: [[threshold: 75.0, metric: 'LINE', baseline: 'MODIFIED_LINES']])
      		            }
      		            else{
      		                recordCoverage(tools: [[parser: 'JACOCO']],
                                                             id: 'jacoco', name: 'JaCoCo Coverage',
                                                             sourceCodeRetention: 'LAST_BUILD',
                                                             sourceDirectories: [[path: 'glob:**/src/main/java']],
                                                             qualityGates: [
                                                             [threshold: 75.0, metric: 'METHOD', baseline: 'PROJECT']])
      		            }
      		        }
                  }
              }
      

      will appreciate any insights regarding the issue,
      Thanks

            drulli Ulli Hafner
            ronamir95 Ron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: