Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1140

The JAP plugin should better handle and reflect Xray side issues

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.1
    • Component/s: None
    • Labels:
      None

      Description

      Summary:

      When JAP fails during Xray scan jobs and even though the issue is originating on Xray, it will wait until the connection timeout (essentially after Xray times out the request from JAP) - currently the default timeout is 40 minutes.

      Example:

      [Pipeline] stage
      [Pipeline] { (Xray scan)
      [Pipeline] xrayScanBuild
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.NullPointerException
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryXrayClient.parseXrayScanResponse(ArtifactoryXrayClient.java:78)
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryXrayClient.execute(ArtifactoryXrayClient.java:101)
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryXrayClient.xrayScanBuild(ArtifactoryXrayClient.java:57)
      	at org.jfrog.hudson.pipeline.scripted.steps.XrayScanBuildStep$Execution.run(XrayScanBuildStep.java:79)
      	at org.jfrog.hudson.pipeline.scripted.steps.XrayScanBuildStep$Execution.run(XrayScanBuildStep.java:45)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
      

      Suggestions:

      1. Introduce a lower/configurable timeout on JAP's side
      2. Get a Failed Reason Phrase from Xray instead of NPE.
      3. Improve the JAP <> Xray connection management (e.g. reflect scanning status)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eyalb Eyal Ben Moshe
                Reporter:
                andreik Andrei Komarov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: