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

recordIssues takes too long to parse a 180 line file.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Trivial Trivial
    • warnings-ng-plugin
    • Warning Next Generation Version 9.20.0
      Jenkins Version 2.346.2

      The following command:

                      stage('Build-TTF') {
                          steps {
                              sh '''#!/usr/bin/tcsh
                              build.py --clean 
                              build.py --tool ${TOOL}
                              '''
                              recordIssues(
                                  enabledForFailure: true,
                                  aggregatingResults: false,
                                  tool: issues(pattern: 'build_ttf/result-build.json', id: 'Build-TTF', name: 'Build-TTF'),
                              )
       

      Is spending 2-3 hours on the recordIssues step. The JSON file is no longer than 200 lines.

      Console output:

      [Pipeline] recordIssues
      09:23:59  [Build-TTF] Searching for all files in '/projects/jk' that match the pattern 'build_ttf/result-build.json'
      09:23:59  [Build-TTF] -> found 1 file
      09:23:59  [Build-TTF] Successfully parsed file /projects/jk/build_ttf/result-build.json
      09:23:59  [Build-TTF] -> found 20 issues (skipped 0 duplicates)
      12:27:03  [Build-TTF] Post processing issues on 'HHGW-14' with source code encoding 'UTF-8'
      12:27:03  [Build-TTF] Creating SCM blamer to obtain author and commit information for affected files
      12:27:03  [Build-TTF] -> No blamer installed yet. You need to install the 'git-forensics' plugin to enable blaming for Git.
      12:27:03  [Build-TTF] Resolving file names for all issues in workspace '/projects/jk'
      12:27:03  [Build-TTF] -> resolved paths in source directory (1 found, 0 not found)
      12:27:03  [Build-TTF] Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files)
      12:27:03  [Build-TTF] -> resolved module names for 20 issues
      12:27:03  [Build-TTF] Resolving package names (or namespaces) by parsing the affected files
      12:27:03  [Build-TTF] -> resolved package names of 1 affected files
      12:27:03  [Build-TTF] Applying 1 filters on the set of 20 issues (0 issues have been removed, 20 issues will be published)
      12:27:03  [Build-TTF] Creating fingerprints for all affected code blocks to track issues over different builds
      12:27:03  [Build-TTF] -> created fingerprints for 20 issues (skipped 0 issues)
      12:27:03  [Build-TTF] Copying affected files to Jenkins' build folder '/some/path/'
      12:27:03  [Build-TTF] -> 1 copied, 0 not in workspace, 0 not-found, 0 with I/O error
      12:27:03  [Build-TTF] Repository miner is not configured, skipping repository mining
      12:27:03  [Build-TTF] Reference build recorder is not configured
      12:27:03  [Build-TTF] Obtaining reference build from same job (Build-TTF)
      12:27:03  [Build-TTF] No valid reference build found that meets the criteria (NO_JOB_FAILURE - SUCCESSFUL_QUALITY_GATE)
      12:27:03  [Build-TTF] All reported issues will be considered outstanding
      12:27:03  [Build-TTF] No quality gates have been set - skipping
      12:27:03  [Build-TTF] Health report is disabled - skipping
      12:27:03  [Build-TTF] Created analysis result for 20 issues (found 0 new issues, fixed 0 issues)
      12:27:03  [Build-TTF] Attaching ResultAction with ID 'Build-TTF' to build 'Build-TTF #113' 

      If you notice the timestamp, it is taking  3h to move from  "found 20 issues" to  "Post processing issues" 

      This long delay is happening ONLY on jobs triggered by a timer. For jobs triggered by Github(Pull requests, merges to master it is running in 5-10 seconds)

      Any idea why this is taking so much time ?

      Thanks,
      Mustafa

            drulli Ulli Hafner
            mlulaj Mustafa Lulaj
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: