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

Mandate consistent iteration order for DepthFirstScanner

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • workflow-api-plugin
    • None

      DepthFirstScanner in the graphanalysis APIs works, but the API mandates that it visit the first node then the branches after (but in reverse order).

      Instead we should visit the branches in order for drop-in compatibility with FlowGraphWalker

      This will, incidentally, fix JENKINS-38457.

          [JENKINS-38458] Mandate consistent iteration order for DepthFirstScanner

          Jesse Glick added a comment -

          JENKINS-38457 did you mean?

          Jesse Glick added a comment - JENKINS-38457 did you mean?

          Jesse Glick added a comment -

          Does not fix JENKINS-38457, since that requires FlowGraphTable to also reverse its parallel branches.

          Jesse Glick added a comment - Does not fix JENKINS-38457 , since that requires FlowGraphTable to also reverse its parallel branches.

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/DepthFirstScanner.java
          http://jenkins-ci.org/commit/workflow-api-plugin/3baae43984b507100343473c61c6c7615085d02e
          Log:
          Make DepthFirstScanner obey last->first parallel branch ordering per JENKINS-38458

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/DepthFirstScanner.java http://jenkins-ci.org/commit/workflow-api-plugin/3baae43984b507100343473c61c6c7615085d02e Log: Make DepthFirstScanner obey last->first parallel branch ordering per JENKINS-38458

          Sam Van Oort added a comment -

          Addressed with https://github.com/jenkinsci/workflow-api-plugin/pull/16 (enforcing the same semi-loony iteration order as FlowGraphWalker, but at least that makes it fully compatible).

          Sam Van Oort added a comment - Addressed with https://github.com/jenkinsci/workflow-api-plugin/pull/16 (enforcing the same semi-loony iteration order as FlowGraphWalker, but at least that makes it fully compatible).

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/DepthFirstScanner.java
          src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/package-info.java
          src/test/java/org/jenkinsci/plugins/workflow/graphanalysis/FlowScannerTest.java
          http://jenkins-ci.org/commit/workflow-api-plugin/bcd2e30a9a3e3c9a9364c47ffec04cfe715f41fc
          Log:
          Merge pull request #16 from jenkinsci/make-depthfirstscanner-obey-ordering-JENKINS-38458

          Make DepthFirstScanner obey first-last parallel branch ordering JENKINS-38458

          Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/85d91e8e2e09...bcd2e30a9a3e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/DepthFirstScanner.java src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/package-info.java src/test/java/org/jenkinsci/plugins/workflow/graphanalysis/FlowScannerTest.java http://jenkins-ci.org/commit/workflow-api-plugin/bcd2e30a9a3e3c9a9364c47ffec04cfe715f41fc Log: Merge pull request #16 from jenkinsci/make-depthfirstscanner-obey-ordering- JENKINS-38458 Make DepthFirstScanner obey first-last parallel branch ordering JENKINS-38458 Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/85d91e8e2e09...bcd2e30a9a3e

          Sam Van Oort added a comment -

          Released as v2.4

          Sam Van Oort added a comment - Released as v2.4

            svanoort Sam Van Oort
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: