-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
jenkins-2.7.3-rc
It is a follow-up task to the investigation of JENKINS-37759. The original theory in this bug was incorrect, and lead to the pull request, which streamlines dependencies between startup tasks. Actually it is not required since Jenkins forces InitMilestone order by InitMilestone#ordering(). But it still makes sense to integrate the PR.
Original PR: https://github.com/jenkinsci/jenkins/pull/2524
- is related to
-
JENKINS-37759 Usage of @Initializer(after = InitMilestone.COMPLETED) in plugins breaks the initialization logic
-
- Resolved
-
[JENKINS-37805] Jenkins startup task dependencies should be more explicit
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |
Priority | Original: Blocker [ 1 ] | New: Minor [ 4 ] |
Link |
New:
This issue is related to |
Description |
Original:
It happens due to https://github.com/jenkinsci/jenkins/pull/2177/files, which makes COMPLETED dependent on the following logic: {code} // All plugins are loaded. Now we can figure out who depends on who. requires(PLUGINS_PREPARED).attains(COMPLETED).add("Resolving Dependant Plugins Graph", new Executable() { @Override public void run(Reactor reactor) throws Exception { resolveDependantPlugins(); } }); {code} In this case COMPLETED state logic does not depend on the Job loading state, hence COMPLETED milestone can be achieved before JOB_LOADED in the reactor. It may easily happen when Job loading takes MUCH time. In such case COMPLETED state gets overridden by JOB_LOADED. Sample script for the issue analysis: {code} import hudson.init.InitMilestone; import hudson.util.HttpResponses; import javax.servlet.http.HttpServletResponse; final Jenkins jenkins = Jenkins.getInstance(); if (jenkins.getInitLevel().compareTo(InitMilestone.COMPLETED) < 0) { println "Error: Jenkins initialization has not reached the COMPLETED state. Current state is ${jenkins.getInitLevel()}" return HttpResponses.status(HttpServletResponse.SC_SERVICE_UNAVAILABLE); } {code} |
New:
It is a follow-up task to the investigation of Original PR: https://github.com/jenkinsci/jenkins/pull/2524 |
Labels | Original: lts-candidate |