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

Downstream jobs are not guaranteed to build when the job configs have been updated recently



    • Improvement
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None
    • Jenkins: 2.322
    • 2.346


      We have a freestyle job (named config_job) that configures other freestyle jobs on the same jenkins via REST. In some of these freestyle jobs the config_job is added as a reverse build trigger and thus some jobs become downstream jobs of the config_job. We noticed that sometimes these newly added downstream jobs are not built.

      After looking at the jenkins source code, we noticed the following TODO in BuildTrigger.executes:

      // TODO this may not yet be up to date if rebuildDependencyGraphAsync has been used; need a method to wait for the last call made before now to finish
      final DependencyGraph graph = Jenkins.get().getDependencyGraph();

      Since the dependency graph is still rebuilding when our config_job finishes, an old version of the dependency graph is used which does not include the reverse triggers we just added and thus some downstream jobs are not built.


        Issue Links


            simon_sohrt Simon Sohrt created issue -
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Released As 2.341
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            spammy Anyi Zhu made changes -
            Comment [ This change seems to cause another bug, in the set up of a multi-node build if the parent job is built on the master node while the child job is build on the slave node it seems the child job would never be built and no error message is shown at all. ]
            basil Basil Crow made changes -
            Link This issue causes JENKINS-68189 [ JENKINS-68189 ]
            markewaite Mark Waite made changes -
            Released As 2.341 2.341, 2.343
            basil Basil Crow made changes -
            Released As 2.341, 2.343 2.346


              Unassigned Unassigned
              simon_sohrt Simon Sohrt
              0 Vote for this issue
              4 Start watching this issue