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

Need better error when 'p4approve' Jenkins plugin fails

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None

      Hello Perforce Team,

       

      Looks like the 'p4approve' step of p4 plugin when commit fails reports 500 error, when the SWARM log provides more informative error message

       

      For example:

      Snapshot from Jenkins log:

      22:08:08  (p4):stop:422:08:10  Swarm Error - url: https://sp4-fp-swarm.cisco.com/api/v4/reviews/3025208/state code: 50022:08:10  Swarm error message: Internal Server Error

       

      Snapshot from SWARM log:

      *2022-07-04T22:08:09-07:00 DEBUG (7): P4 (0000000079090a3200000000484dcdd0) start command: counter -u swarm-review-ffd1d6c7 {"changes":[3025207,3025209],"commits":[],"commitStatus":

      {"error":"Command failed: Submit validation failed -- fix problems then try again.\n\u0027submitcheck\u0027 validation failed: \nSubmit Policy violation\n\nDescription must contain proper entries.\nError: #12: Only CDETS bug IDs (e.g. - CSCab12345) allowed!\n\nUse \u0027p4 change 3025329\u0027 to edit description, then \u0027p4 submit -c 3025329\u0027 to\nsubmit the change to the depot."}

      ,"type":null,"versions":[{"difference":1,"stream":null,"streamSpecDifference":0,"change":3025208,"user":"backdraft.gen","time":1656954554,"pending":true,"addChangeMode":"replace","archiveChange":3025209,"testRuns":[30131]}],"author":"backdraft.gen","approvals":{"builders":[1,1]},"participants":{"backdraft.gen":[],"builders":{"vote":

      {"value":1,"version":1}

      }},"hasReviewer":1,"description":"\nFixes: #752810\n\nChange description:\nBump Backdraft pointer\n\nPR: https:\/\/wwwin-github.cisco*

      The CURL output provides a informative message as well:

      ❯❯ curl -u $c -X PATCH -d "state=approved"  -d "commit=1" https://sp4-fp-swarm.cisco.com/api/v4/reviews/3025208/state

      {"error":"Out of date files must be resolved or reverted.","isValid":false}

       

       

      Is it possible to have actual error in the Jenkins output instead of general 'internal server error'?

            Unassigned Unassigned
            ssingh03 Shalinderjeet Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: