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

workflow plugin does not provide console to warnings plugin, sleep required

    XMLWordPrintable

Details

    • Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Major
    • Resolution: Fixed
    • warnings-ng-plugin
    • workflow-plugin 1.12
      warnings plugin 4.51
      jenkins 1.641

    Description

      I came up with the following workflow script brooken.groovy, which
      compiles a file with clang, and then invokes the warnings plugin.

      In the console log, there are warnings, but the warnings plugin detects zero warnings.

      I modified the script slightly (fixed.groovy) by inserting a sleep statement before calling the warnings plugin. I re-ran the script and the warnings plugin detected the warnings.

      It looks like the workflow-plugin is not providing the console to the warnings plugin when it needs it? Maybe a flush is missing?

      Attachments

        Issue Links

          Activity

            drulli Ulli Hafner added a comment -

            Ah thanks! Yes, that means I can remove my 5 sec sleep

            drulli Ulli Hafner added a comment - Ah thanks! Yes, that means I can remove my 5 sec sleep
            drulli Ulli Hafner added a comment -

            I'm reopening so that I do not forget to remove the workaround in the warnings plugin.

            drulli Ulli Hafner added a comment - I'm reopening so that I do not forget to remove the workaround in the warnings plugin.
            alexanderstohr_li Alexander added a comment - - edited

            I do have a build that reports this as a notice before instantly aborting
            (the last line might lack a bunch of line breaks already from the start... stars were consumed by inserting it here):

             

            [GNU C Compiler (gcc)] Sleeping for 5 seconds due to JENKINS-32191...
            [GNU C Compiler (gcc)] Parsing console log (workspace: '/home/jenkins/agent/workspace/workspace/<project_name>/build')
            Unable to change directory using: .Entering directory (?<dir>.) to match Entering directory: D0750 0 deploy

             

            I now have to guess if its related in some way to the ticket right here
            (like some subdirs not yet present due to insufficient other process completion)
            or if it is something totally different (that i was unable to clearly track down for now).

            Setup:

            • Jenkins 2.346.3
            • workflow-job / Pipeline Job plugin 1207.ve6191ff089f8

            side note: if you had released your change already, then it would be less of a question, at least underneath this ticket.

            alexanderstohr_li Alexander added a comment - - edited I do have a build that reports this as a notice before instantly aborting (the last line might lack a bunch of line breaks already from the start... stars were consumed by inserting it here):   [GNU C Compiler (gcc)] Sleeping for 5 seconds due to JENKINS-32191 ... [GNU C Compiler (gcc)] Parsing console log (workspace: '/home/jenkins/agent/workspace/workspace/<project_name>/build') Unable to change directory using: . Entering directory (?<dir>. ) to match Entering directory: D0750 0 deploy   I now have to guess if its related in some way to the ticket right here (like some subdirs not yet present due to insufficient other process completion) or if it is something totally different (that i was unable to clearly track down for now). Setup: Jenkins 2.346.3 workflow-job / Pipeline Job plugin 1207.ve6191ff089f8 side note: if you had released your change already, then it would be less of a question, at least underneath this ticket.
            alexanderstohr_li Alexander added a comment -

            Found the reported line and breakage to be unrelated to this ticket.

            When doing some "scp" command with a "-v" flag for verbosity, then you might see messages like:

            Entering directory: D0750 0 deploy

            This will later on result in an error when doing some parsing with maybe e.g. warnings-ng (or similar).
            The final line where the codes then will exit is of that format:

            throw new ParsingException("Unable to change directory using: %s to match %s", makePath.toString(), line);

            For now i will drop the "-v" switch - but i probably also will do some report to the respective tooling that fails to hard for such a line.

            References:
            https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/LookaheadParser.java
            https://unix.stackexchange.com/questions/655319/how-to-scp-from-remote-root-directory

            alexanderstohr_li Alexander added a comment - Found the reported line and breakage to be unrelated to this ticket. When doing some "scp" command with a "-v" flag for verbosity, then you might see messages like: Entering directory: D0750 0 deploy This will later on result in an error when doing some parsing with maybe e.g. warnings-ng (or similar). The final line where the codes then will exit is of that format: throw new ParsingException("Unable to change directory using: %s to match %s", makePath.toString(), line); For now i will drop the "-v" switch - but i probably also will do some report to the respective tooling that fails to hard for such a line. References: https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/LookaheadParser.java https://unix.stackexchange.com/questions/655319/how-to-scp-from-remote-root-directory
            drulli Ulli Hafner added a comment -

            Please create an issue in the warnings plugin (or directly provide a PR that will improve the regular expression that scans for directory changes).

            drulli Ulli Hafner added a comment - Please create an issue in the warnings plugin (or directly provide a PR that will improve the regular expression that scans for directory changes).

            People

              drulli Ulli Hafner
              rodrigc Craig Rodrigues
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: