• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • p4-plugin 1.10.4
      Jenkins 1.176.1

      When 'quiet' is set to true 'p4 reconcile' and preferably other commands also need to have the file list quashed.

      For example hide the 'refreshed' below :

      P4 Task: cleaning workspace to match have list.
      ... p4 reconcile -f -w /var/lib/jenkins/workspace/Pipeline_Quiet_True/... -p4 reconcile -f -w /var/lib/jenkins/workspace/Pipeline_Quiet_True/...
      
      //depot/Project1/sub1/f564#1 - /var/lib/jenkins/workspace/Pipeline_Quiet_True/sub1/f564 refreshed
      duration: (2ms)
      
      P4 Task: syncing files at change: 565
      ... p4 sync -q /var/lib/jenkins/workspace/Pipeline_Quiet_True/...@565 -p4 sync -q /var/lib/jenkins/workspace/Pipeline_Quiet_True/...@565
      duration: (2ms)
      

      Code:

      pipeline {
        agent { label 'master' }
        stages {
          stage("Repro") {
            steps {
      	p4sync charset: 'none', credential: 'JenkinsMaster', populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), source: depotSource('//depot/Project1/...')
            }
          }
        }
      

      When there are a few files to be reconciled it's not a problem but when there are 1000's this overloads the logs making them difficult to work with and diagnose problems.

       

          [JENKINS-59750] Quiet all Perforce output when quiet:true.

          In my 100's of job configurations and with the size of my source code, the '-q' on p4 reconcile puts 43,156 lines in EVERY jenkins log file.

          Heather Mardis added a comment - In my 100's of job configurations and with the size of my source code, the '-q' on p4 reconcile puts 43,156 lines in EVERY jenkins log file.

          Karl Wirth added a comment -

          In addition the output in 'p4 changes -m1' can trip up log analyzers which fail builds when error messages are detected. Would be good if this was also hidden from the log. For example this is from a standard polled freestyle job:

          Started by an SCM change
          Running as SYSTEM
          [EnvInject] - Loading node environment variables.
          Building on master in workspace /var/lib/jenkins/workspace/00640681_Polling_Exclude_User
          Executor number at runtime: 0
          (p4):cmd:... p4 login -s
          p4 login -sUser super ticket expires in 5 hours 15 minutes.(p4):stop:3
          (p4):cmd:... p4 client -o jenkins-master-00640681_Polling_Exclude_User-3
          p4 client -o jenkins-master-00640681_Polling_Exclude_User-3(p4):stop:4
          (p4):cmd:... p4 info
          p4 info(p4):stop:5
          (p4):cmd:... p4 info
          p4 info(p4):stop:6
          (p4):cmd:... p4 client -o jenkins-master-00640681_Polling_Exclude_User-3
          p4 client -o jenkins-master-00640681_Polling_Exclude_User-3(p4):stop:7
          (p4):cmd:... p4 counter change
          p4 counter change(p4):stop:8
          (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-master-00640681_Polling_Exclude_User-3/...
          p4 changes -m1 -ssubmitted //jenkins-master-00640681_Polling_Exclude_User-3/...Change 89712 on 2020/04/15 by super@test_ws 'Fix Error Message: FATAL ERROR at line 1234'
          

          The above 'FATAL ERROR' in the changelist description would fool the paser.

           

           

          Karl Wirth added a comment - In addition the output in 'p4 changes -m1' can trip up log analyzers which fail builds when error messages are detected. Would be good if this was also hidden from the log. For example this is from a standard polled freestyle job: Started by an SCM change Running as SYSTEM [EnvInject] - Loading node environment variables. Building on master in workspace / var /lib/jenkins/workspace/00640681_Polling_Exclude_User Executor number at runtime: 0 (p4):cmd:... p4 login -s p4 login -sUser super ticket expires in 5 hours 15 minutes.(p4):stop:3 (p4):cmd:... p4 client -o jenkins-master-00640681_Polling_Exclude_User-3 p4 client -o jenkins-master-00640681_Polling_Exclude_User-3(p4):stop:4 (p4):cmd:... p4 info p4 info(p4):stop:5 (p4):cmd:... p4 info p4 info(p4):stop:6 (p4):cmd:... p4 client -o jenkins-master-00640681_Polling_Exclude_User-3 p4 client -o jenkins-master-00640681_Polling_Exclude_User-3(p4):stop:7 (p4):cmd:... p4 counter change p4 counter change(p4):stop:8 (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-master-00640681_Polling_Exclude_User-3/... p4 changes -m1 -ssubmitted //jenkins-master-00640681_Polling_Exclude_User-3/...Change 89712 on 2020/04/15 by super @test_ws 'Fix Error Message: FATAL ERROR at line 1234' The above 'FATAL ERROR' in the changelist description would fool the paser.    

          Please can something be done about this soon as it is causing a lot of issues with the log parser falsely detecting error conditions?

          Andrew Barnish added a comment - Please can something be done about this soon as it is causing a lot of issues with the log parser falsely detecting error conditions?

          Karl Wirth added a comment -

          FYI p4paul - Please review this in your current sprint planning cycle.

          Karl Wirth added a comment - FYI p4paul - Please review this in your current sprint planning cycle.

          The main issue for us is that the changelist descriptions can contain random strings that trigger the log parser.
          Things like "Test Failed" or "ERROR".

          So we would like an option to turn off Perforce changelist descriptions at least.
          But making all information output quiet would would suffice as this issue is requesting.

          Andrew Barnish added a comment - The main issue for us is that the changelist descriptions can contain random strings that trigger the log parser. Things like "Test Failed" or "ERROR". So we would like an option to turn off Perforce changelist descriptions at least. But making all information output quiet would would suffice as this issue is requesting.

          Paul Allen added a comment -

          Release in 1.10.13

          Paul Allen added a comment - Release in 1.10.13

          Karl Wirth added a comment -

          Quiet is not quietting ALL perforce output in 1.11.1 and 1.11.2.

          For example 'Error' in the changelist description is seen multiple times in a Freestyle job console log:

           

          (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@10402
          p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@10402
          Change 10402 on 2021/02/11 by super@test_ws 'Error in my changelist descript'

           

          This breaks Jenkins log parsers that fail the build.

          Will attach a simple repro case and console log.

           

          Karl Wirth added a comment - Quiet is not quietting ALL perforce output in 1.11.1 and 1.11.2. For example 'Error' in the changelist description is seen multiple times in a Freestyle job console log:   (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@10402 p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@10402 Change 10402 on 2021/02/11 by super @test_ws 'Error in my changelist descript'   This breaks Jenkins log parsers that fail the build. Will attach a simple repro case and console log.  

          Karl Wirth added a comment - - edited

          Reproduction case

          (1) Create a Freestyle job with 'Quiet Perforce messages' ticked.

          (2) Build the job.

          (3) Submit a changelist that contains the Description 'Error in my changelist description'.

          (4) Build the job.

          (5) Occurrences of 'p4 changes -m1' display the output to the text console log (see console.txt attached).

           

          Karl Wirth added a comment - - edited Reproduction case (1) Create a Freestyle job with 'Quiet Perforce messages' ticked. (2) Build the job. (3) Submit a changelist that contains the Description 'Error in my changelist description'. (4) Build the job. (5) Occurrences of 'p4 changes -m1' display the output to the text console log (see console.txt attached).  

          Karl Wirth added a comment -

          Provisional fix added and tested:

               https://github.com/jenkinsci/p4-plugin/commit/34030f1c8778c9dd310a461ee176500b60e9070c

          Example output:

           

          (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@9402,10402
          p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@9402,10402
          (p4):stop:10
          

          Available as a nightly build:

              https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/

           

          Karl Wirth added a comment - Provisional fix added and tested:      https://github.com/jenkinsci/p4-plugin/commit/34030f1c8778c9dd310a461ee176500b60e9070c Example output:   (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@9402,10402 p4 changes -m1 -ssubmitted //jenkins-master-FreestyleBoring-1/...@9402,10402 (p4):stop:10 Available as a nightly build:     https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/  

          m added a comment -

          p4karl That's a pretty neat feature "Hide Server Messages for all Perforce  commands". I will definitely use it when it becomes available in the plugin (provided we can use it as part of scripted pipeline)

          m added a comment - p4karl That's a pretty neat feature "Hide Server Messages for all Perforce  commands". I will definitely use it when it becomes available in the plugin (provided we can use it as part of scripted pipeline)

            p4paul Paul Allen
            p4karl Karl Wirth
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: