Example from failing ATH test:
checkstyle plugin has optional dependency on dashboard view plugin. In this case are both plugin required in the same time from UI. According to right order of dependency, jenkins should install dashboard view first (since checkstyle is dependent on it). In case that dashboard is installed before checkstyle, extensions points in checkstyle plugin which are optional is not loaded and checkstyle dashboard view portlets are not available.
Everything is loaded properly when Jenkins is restarted.
I believe this can be fixed by including optional dependencies into process which determine installation order for plugins.
There several tests in ATH which fail because of it:
It is not so easy to catch it because other plugins or other dependencies can influence order. But in with these plugins alone and jenkins-2.89.3, it is easy to reproduce:
I load screen shot of ath tests for documentation.